關(guān)于更新CocoaPods
最近從gitHub上下載了一些demo,然后pod install 發(fā)現(xiàn)都報同一個錯誤:[!] Unable to find a specification for XXXXXX
經(jīng)過仔細(xì)尋找答案后發(fā)現(xiàn)是CocoaPods版本的原因:
解決辦法:
pod repo remove master
pod setup
pod install
CocoaPods常見問題
目錄權(quán)限不夠報錯
ERROR: While executing gem … (Gem::FilePermissionError) You don’t have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
解決,修改權(quán)限:
sudo chmod 777 /Library/Ruby/Gems/2.0.0
更新cocoapods權(quán)限問題
gem install rails
Fetching: activesupport-4.2.4.gem (100%)
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Library/Ruby/Gems/2.0.0/cache/activesupport-4.2.4.gem
解決:
sudo gem install cocoapods
gem需要更新報錯
ERROR: While executing gem … (Errno::EACCES)
Permission denied - /Library/Ruby/Gems/2.0.0/cache/i18n-0.7.0.gem
解決:
gem update –system
CocoaPods版本低
pod search XXX 庫版本低于 Github 上庫最新版本
參考鏈接:
pod search XXX 庫版本低于 Github 上庫最新版本 - 簡書http://www.itdecent.cn/p/cf6927342572
更新CocoaPods版本
sudo gem install -n /usr/local/bin cocoapods
pod setup失?。崾惧e誤信息
pod setup失?。崾惧e誤信息:
[!] /usr/local/bin/git fetch --unshallow
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': transfer closed with outstanding read data remaining
參考鏈接:
執(zhí)行pod setup很慢很慢解決方案 - 簡書http://www.itdecent.cn/p/43a268ba8f47
[toc]