最近合作開發(fā)的項(xiàng)目彩库,Git拉下來發(fā)現(xiàn)CocoaPods管理的三方庫中亂成一了鍋粥瑟啃!--!最后發(fā)現(xiàn)我的pod版本太低职恳,那就升級唄所禀。
由于之前安裝過CocoaPods,淘寶源也沒問題放钦,直接終端輸入:
$ sudo gem install cocoa pods
結(jié)果提示錯誤如下:
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/pod
經(jīng)過多方查詢色徘,終于找到個靠譜的解決方案(注意:最后的--pre要加上才能更新到最新版本):
$ sudo gem install -n /usr/local/bin cocoapods --pre
運(yùn)行結(jié)果,完美操禀!
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遇到更新不了的原因