CocoaPods在OS X El下不能正常更新
2016-08-03 本文已影响35人
逐水而上
最近合作开发的项目,Git拉下来发现CocoaPods管理的三方库中乱成一了锅粥!--!最后发现我的pod版本太低,那就升级呗。
由于之前安装过CocoaPods,淘宝源也没问题,直接终端输入:
$ sudo gem install cocoa pods
结果提示错误如下:
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/pod
经过多方查询,终于找到个靠谱的解决方案(注意:最后的--pre要加上才能更新到最新版本):
$ sudo gem install -n /usr/local/bin cocoapods --pre
运行结果,完美!
Fetching: cocoapods-core-1.1.0.beta.1.gem (100%)
Successfully installed cocoapods-core-1.1.0.beta.1
Fetching: cocoapods-downloader-1.1.0.gem (100%)
Successfully installed cocoapods-downloader-1.1.0
Fetching: cocoapods-try-1.1.0.gem (100%)
Successfully installed cocoapods-try-1.1.0
Fetching: molinillo-0.5.0.gem (100%)
Successfully installed molinillo-0.5.0
Fetching: xcodeproj-1.2.0.gem (100%)
Successfully installed xcodeproj-1.2.0
Fetching: fourflusher-1.0.1.gem (100%)
Successfully installed fourflusher-1.0.1
Fetching: gh_inspector-1.0.2.gem (100%)
Successfully installed gh_inspector-1.0.2
Fetching: cocoapods-1.1.0.beta.1.gem (100%)
Successfully installed cocoapods-1.1.0.beta.1
Parsing documentation for cocoapods-core-1.1.0.beta.1
Installing ri documentation for cocoapods-core-1.1.0.beta.1
Parsing documentation for cocoapods-downloader-1.1.0
Installing ri documentation for cocoapods-downloader-1.1.0
Parsing documentation for cocoapods-try-1.1.0
Installing ri documentation for cocoapods-try-1.1.0
Parsing documentation for molinillo-0.5.0
Installing ri documentation for molinillo-0.5.0
Parsing documentation for xcodeproj-1.2.0
Installing ri documentation for xcodeproj-1.2.0
Parsing documentation for fourflusher-1.0.1
Installing ri documentation for fourflusher-1.0.1
Parsing documentation for gh_inspector-1.0.2
Installing ri documentation for gh_inspector-1.0.2
Parsing documentation for cocoapods-1.1.0.beta.1
Installing ri documentation for cocoapods-1.1.0.beta.1
8 gems installed
参考链接:CocoaPod遇到更新不了的原因