cocoapods错误

(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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容