cocoapods安装常见问题(持续更新)
2016-01-17 本文已影响0人
绥翼
一:
错误提示:
[!] /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
原因:
安装了多个xcode版本,cocoapods安装时不能找到xcode安装路径。
解决方案:

点击右键,查看包内容
找到Developer文件夹
在终端中输入指令sudo xcode-select -switch +Developer文件夹路径(直接把文件夹拖进终端)

回车后再重新安装cocoapod即可!
二:
错误提示:
ERROR:While executing gem … (Errno::EPERM)
Operation not permitted - /usr/bin/pod
解决方法:
使用下面指令直接安装即可
sudo gem install -n /usr/local/bin cocoapods --pre