(1)显示cocoapods已经安装成功
Successfully installed cocoapods-1.2.0
Parsing documentation for cocoapods-1.2.0
1 gem installed
但是,确报错!!!
/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有关,就查找git版本,git --version ,结果又报错
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的路径)
解决问题!
二、已经安装但是还是报错
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