您的位置:首页 > 大数据 > 人工智能

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

2016-07-09 22:23 771 查看
在安装cocoapods遇到的问题
<code class="hljs r has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;"> [!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master
Cloning into <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'master'</span><span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">...</span>
error: RPC failed; curl <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">56</span> SSLRead() <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">return</span> error -<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">36</span>
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li></ul>


解决方案: 

打开终端命令行,输入一下命令:
<code class="hljs cs has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;">sudo xcode-<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">select</span> -<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">switch</span> /Applications/Xcode.app/Contents/Developers</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>


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

1、当然一个xcode执行这行肯定没问题 


 

2、也许你是多个xcode 


 

那么你的命令行就要修改一下:
<code class="hljs cs has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;">sudo xcode-<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">select</span> -<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">switch</span> /Applications/Xcode <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">7.3</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.1</span>.app/Contents/Developers</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>


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

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

3、最简便的方式是: 

先在终端输入”sudo xcode-select -switch “,然后,打开Xcode—>右键显示包内容,找到Developers文件夹拖到终端里面 
总结根据情况修改命令行的代码呦!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: