系統升級到10.13之後cocoapods安裝失敗問題解決辦法

Glen2017發表於2018-01-16

系統升級到最新版本(10.13.x)之後發現cocoapods更新失敗了,重新安裝之後也提示如下錯誤:

$ pod setup
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
複製程式碼

說明pod的路徑沒有指向usr/local/bin目錄,所以只要更改一下install命令引數就好:

$ sudo gem install -n /usr/local/bin cocoapods
Successfully installed cocoapods-1.3.1
Parsing documentation for cocoapods-1.3.1
Done installing documentation for cocoapods after 2 seconds
1 gem installed

複製程式碼

相關文章