裝了五次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作用相同,作者親測。效果極佳!!!!
另外我還翻墻了。