最新版CocoaPods安装 error: RPC failed; curl 56 SSLRead() return error -9806 解决方案

2016.10.16更新

  1. 今天在安装cocoapods时发现的这个错误,解决方法在此记录下

其他安装过程在此省略,在终端输入pod setup 时出现以下错误

MacBook-Pro:~ Ben$ 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

解决方案:在终端依次执行以下命令行

$ brew remove git
$ brew remove curl

$ brew install openssl
$ brew install --with-openssl curl
$ brew install --with-brewed-curl --with-brewed-openssl git

stackoverflow传送门

2017.03.02更新

2.更新了MacOS系统之后,安装时出现下面的错误。

 ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: cocoapods requires cocoapods-core (= 0.38.2), claide (~> 0.9.1), xcodeproj (~> 0.26.3), cocoapods-downloader (~> 0.9.1), cocoapods-plugins (~> 0.4.2), cocoapods-stats (~> 0.5.3), cocoapods-try (~> 0.4.5), cocoapods-trunk (~> 0.6.1), molinillo (~> 0.3.1)

其实是依赖的环境版本过低,需要更新

执行
sudo gem update --system

出现RubyGems system software updated

在执行
sudo gem install -n /usr/local/bin cocoapods即可
    原文作者:JiangBen_iOS
    原文地址: https://www.jianshu.com/p/0b0b74fc349d
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞