pod install 不成功解決辦法

升級(jí)系統(tǒng)之后發(fā)現(xiàn)原來的pod install 等方法不管用了,提示如下錯(cuò)誤:

-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory

方法是安裝更高版本的源。

1.you need to read all the texts that are displayed when you install RVM,remove the old rvm first

rm -rf ~/.rvm

curl -L https://get.rvm.io | bash -s stable

See:https://stackoverflow.com/questions/11677771/rvm-command-not-found-mac-ox

如果沒刪除原有的源,在接下來的步驟當(dāng)你執(zhí)行 rvm 操作時(shí)會(huì)提示如下錯(cuò)誤:

rvm: command not found MAC OX

2.you need to close the terminal ,then open again!

3.安裝新版ruby

command rvm install 2.3.0

4.使用下載好的ruby作為默認(rèn)ruby源

rvm use 2.3.0 --default

5.安裝cocoapods

sudo gem install -n /usr/local/bin cocoapods

接下來就可以執(zhí)行常見的pod操作命令了。

cd 到指定目錄 安裝pod

pod install

See:http://blog.csdn.net/sharktoping/article/details/52311460

https://stackoverflow.com/questions/11677771/rvm-command-not-found-mac-ox

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。