一、錯誤
(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:

解決: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

解決:出現(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.

解釋: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’