sudo gem uninstall cocoapods
sudo gem install cocoapods

安裝會遇到

You don't have write permissions for the /usr/bin directory. 

更改為路徑

sudo gem uninstall -n /usr/local/bin cocoapods
sudo gem install -n /usr/local/bin cocoapods -v 1.10.0

就可以安裝

Categorized in: