cocopods遇到error: RPC failed; curl 56 SSL read: error:00000000:lib(0):func(0):reason(0), errno 60
在安裝cocoapods遇到的問(wèn)題
[!] /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
解決方案:
打開(kāi)終端命令行曹抬,輸入一下命令:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
并一定是這行代碼师妙,要根據(jù)自己的情況浸策,來(lái)修改這個(gè)命令行
1群凶、當(dāng)然一個(gè)xcode執(zhí)行這行肯定沒(méi)問(wèn)題
image
2、也許你是多個(gè)xcode
image
那么你的命令行就要修改一下:
sudo xcode-select -switch /Applications/Xcode 7.3.1.app/Contents/Developer
根據(jù)你默認(rèn)的xcode來(lái)修改在/Applications/和/Contents/Developer中間的app的名字窿锉,如果你默認(rèn)的是Xcode x.x.x.app潭兽,中間就要替換掉喲!
ps:?jiǎn)栴}還存在煌往,把xcode全部卸載,只裝一個(gè)最新的轧邪。
3、最簡(jiǎn)便的方式是:
先在終端輸入
sudo xcode-select -switch
然后羞海,打開(kāi)Xcode—>右鍵顯示包內(nèi)容忌愚,找到Developer文件夾拖到終端里面
PS:一些xcode-select的命令的使用:
xcode-select [-help]
xcode-select [-switch xcode_folder_path]
xcode-select [-print-path]
xcode-select [-version]
例如:
打印當(dāng)前xcode的路徑
xcode-select --print-path
輸出:
/Applications/Xcode.app/Contents/Developer