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

在安装cocoapods遇到的问题

[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git masterCloning into 'master'...error: RPC failed; curl 56 SSLRead() return error -36fatal: The remote end hung up unexpectedlyfatal: early EOFfatal: index-pack failed

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

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

并一定是这行代码,要根据自己的情况,来修改这个命令行

  • 当然一个xcode执行这行肯定没问题
    单个xcode
  • 也许你是多个xcode
    安装多个xcode

    那么你的命令行就要修改一下:

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

根据你默认的xcode来修改在/Applications//Contents/Developer中间的app的名字,如果你默认的是Xcode x.x.x.app,中间就要替换掉哟!
ps:问题还存在,把xcode全部卸载,只装一个最新的。

  • 最简便的方式是: 先在终端输入”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]

例如:

//打印当前xcode的路径
xcode-select --print-path
//输出:
/Applications/Xcode.app/Contents/Developer
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容