iOS cocoapods相關(guān)內(nèi)容與錯誤

一、錯誤
(1)錯誤:Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1
解決辦法:sudo gem install cocoapods-core

(2)錯誤: CocoaPods could not find compatible versions for pod "BRPickerView":
In Podfile:


image.png

解決:pod install --repo-update
(3)錯誤:Installing xxx

[!] Error installing xxx
[!] /usr/local/bin/git clone https://github.com/91renb/xxx.git /var/folders/yd/xxx/T/d20210318-9800-gykob8 --template= --single-branch --depth 1 --branch 2.7.3

Cloning into '/var/folders/yd/c87pmc5n5svd_dcqt1890qrm0000gn/T/d20210318-9800-gykob8'...
fatal: unable to access 'https://github.com/91renb/BRPickerView.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

image.png

解決:出現(xiàn)這種情況多半是因為設(shè)置了系統(tǒng)代理

取消全局代理即可
git config --global --unset http.proxy
git config --global --unset https.proxy
如果取消全局代理無效,只能翻墻
(4)警告:
Smart quotes were detected and ignored in your Podfile. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.


image.png

解釋:podfile文件中 使用了中文的單引號’‘ 而非英文下的單引號''

二、內(nèi)容
(1)podfile文件exec格式轉(zhuǎn)換
終端先cd到根目錄
正常格式:終端使用命令chmod 644 Podfile(即文件名) 就會變回正常的了
exec格式:終端使用命令chmod 700 Podfile(即文件名) 就會變回exec格式
(2)清華大學(xué)鏡像
清華大學(xué)鏡像可解決Cocoapods install 慢的問題
清華大學(xué)鏡像網(wǎng)址:https://mirrors.tuna.tsinghua.edu.cn/
pod repo remove master
pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
pod repo update
或者
cd ~/.cocoapods/repos
pod repo remove master
git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
然后在項目的 Podfile在最開頭加上:source ‘https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
禁止轉(zhuǎn)載,如需轉(zhuǎn)載請通過簡信或評論聯(lián)系作者。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容