装了五次CocoaPods,终于装上了,强烈感谢这篇帖子:
原帖 http://www.cnblogs.com/chuange-Strongload/p/5891903.html
- 贴一下重点
安装过程遇到的问题:
1、Ruby版本过低(更新就行了)
2、
$ pod setup
Setting up CocoaPods master repo
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master
Cloning into ‘master’…
error: RPC failed; curl 56 SSLRead() return error -36
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
3、
$ pod setup
Setting up CocoaPods master repo
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master
Cloning into ‘master’…
error: RPC failed; curl 56 SSLRead() return error -9806
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
4、
$ pod setup
Setting up CocoaPods master repo
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master
Cloning into ‘master’…
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
上面错误主要是os10.11+和cocoapods1.0+版本升级的安全机制更改造成的。主要出现在pod setup过程中,且该过程等待时间非常长。
解决方法:
- 镜像用这个
$ gem sources --add https://gems.ruby-china.org/
- 安装
$ sudo gem install -n /usr/local/bin cocoa pods
$ Git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master
该过程作用与 pod setup作用相同,作者亲测。效果极佳!!!!
另外我还翻墙了。
网友评论