一:
錯(cuò)誤提示:
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --depth=1
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line
原因:
安裝了多個(gè)xcode版本,cocoapods安裝時(shí)不能找到xcode安裝路徑陨簇。
解決方案:
點(diǎn)擊右鍵,查看包內(nèi)容
找到Developer文件夾
在終端中輸入指令sudo xcode-select -switch +Developer文件夾路徑(直接把文件夾拖進(jìn)終端)
回車(chē)后再重新安裝cocoapod即可!
二:
錯(cuò)誤提示:
ERROR:While executing gem … (Errno::EPERM)
Operation not permitted - /usr/bin/pod
解決方法:
使用下面指令直接安裝即可
sudo gem install -n /usr/local/bin cocoapods --pre