安装cocoapods遇到error: RPC failed; curl 56 SSLRead() return error -36问题

在安装cocoapods遇到的问题

 [!] /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
   
   
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

解决方案: 
打开终端命令行,输入一下命令:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
   
   
  • 1
  • 1

并一定是这行代码,要根据自己的情况,来修改这个命令行 
1、当然一个xcode执行这行肯定没问题 
单个xcode 
2、也许你是多个xcode 
安装多个xcode 
那么你的命令行就要修改一下:

sudo xcode-select -switch /Applications/Xcode 7.3.1.app/Contents/Developer
   
   
  • 1
  • 1

根据你默认的xcode来修改在/Applications//Contents/Developer中间的app的名字,如果你默认的是Xcode x.x.x.app,中间就要替换掉哟!

ps:问题还存在,把xcode全部卸载,只装一个最新的。

3、最简便的方式是: 
先在终端输入”sudo xcode-select -switch “,然后,打开Xcode—>右键显示包内容,找到Developer文件夹拖到终端里面

PS:一些xcode-select的命令的使用:

xcode-select [-help]
xcode-select [-switch xcode_folder_path]
xcode-select [-print-path]
xcode-select [-version]
   
   
  • 1
  • 2
  • 3
  • 4
  • 1
  • 2
  • 3
  • 4

例如: 
打印当前xcode的路径

xcode-select --print-path
   
   
  • 1
  • 1

输出:

/Applications/Xcode.app/Contents/Developer
   
   
  • 1
  • 1
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值