cocoapods遇到error: RPC failed; curl 56 SSLRead() return error -36問題

在安裝cocoapods遇到的問題git

[!] /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

解決方案:
打開終端命令行,輸入一下命令:github

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

並必定是這行代碼,要根據本身的狀況,來修改這個命令行
一、固然一個xcode執行這行確定沒問題
單個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,中間就要替換掉喲!app

ps:問題還存在,把xcode所有卸載,只裝一個最新的。

三、最簡便的方式是:
先在終端輸入」sudo xcode-select -switch 「,而後,打開Xcode—>右鍵顯示包內容,找到Developer文件夾拖到終端裏面curl

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

xcode-select [-help] xcode-select [-switch xcode_folder_path] xcode-select [-print-path] xcode-select [-version]

例如:
打印當前xcode的路徑ui

xcode-select --print-path

輸出:lua

/Applications/Xcode.app/Contents/Developer
相關文章
相關標籤/搜索