通過RVM安裝Ruby失敗


第一次安裝失敗是由於Homebrew一直安裝不成功,遂去http://brew.sh/index_zh-cn.html官網

通過

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

復制到終端中直接安裝,安裝成功后再通過RVM安裝Ruby還是失敗,根據提示輸入brew doctor查找原因,發現時Xcode版本過低,更新安裝之后並運行Xcode,再通過

rvm install 2.3.0

 安裝了Ruby,安裝Ruby成功后輸入按照常規步驟到

pod repo remove master出現如下錯誤

[!] repo master does not exist

嘗試更換源,輸入如下

 pod repo add master http://git.oschina.net/akuandev/Specs.git出現如下錯誤

[!] To setup the master specs repo, please run `pod setup`.

切換源失敗,根據提示輸入pod setup

剛開始嘗試很多次,都是如下錯誤

Setting up CocoaPods master repo

[!] /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master

 

Cloning into 'master'...

error: RPC failed; curl 56 SSLRead() return error -9806

fatal: The remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

 通過網絡查詢很久后死馬當活馬醫,很多人遇到

error: RPC failed; curl 56 SSLRead() return error -36

輸入

 sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer就能pop setup成功

遂在終端輸入如上

 再進行pod setup,結果如下

Setting up CocoaPods master repo

 

CocoaPods 1.1.0.rc.2 is available.

To update use: `sudo gem install cocoapods --pre`

[!] This is a test version we'd love you to try.

 

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.1.0.rc.2

 

Setup completed 有了綠色的Setup completed即可

最后成功安裝好Ruby

 

注:確保安裝了Xcode命令行工具,忘記是在哪一步安裝了此工具,在終端輸入

xcode-select --install  即可安裝,


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM