(1)顯示cocoapods已經(jīng)安裝成功
Successfully installed cocoapods-1.2.0
Parsing documentation for cocoapods-1.2.0
1 gem installed
但是东帅,確報錯3鹣洹!寥裂!
/Library/Ruby/Gems/2.0.0/gems/cocoapods- 1.2.1.rc.1/lib/cocoapods/command.rb:129:in `verify_minimum_git_version!': [!] You need at least git version 1.8.5 to use CocoaPods (Pod::Informative)
一看跟git有關(guān)趁舀,就查找git版本赖捌,git --version ,結(jié)果又報錯
xcrun: error: active developer path ("/Users/edz/Desktop/Xcode.app/Contents/Developer") does not exist
Use sudo xcode-select --switch path/to/Xcode.app
to specify the Xcode that you wish to use for command line developer tools, or use xcode-select --install
to install the standalone command line developer tools.
See man xcode-select
for more details.
不過很人性化的給出了解決方案:
sudo xcode-select --switch + (xcode.app的路徑)
解決問題!
二矮烹、已經(jīng)安裝但是還是報錯
Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down
解決方法:pod setup
具體方法:參考https://www.2cto.com/kf/201611/562734.html