当我把电脑系统升级到OS10.11之后cocoapods不好用了,各种错误,各种不对,卸载重装依然有一些问题,在经历各种试探和搜索之后找到合适的解决方法,记录下来以便为以后做参考。
原文地址:http://stackoverflow.com/questions/30812777/cannot-install-cocoa-pods-after-uninstalling-results-in-error/30851030#30851030
Answer:
As it has been pointed out below, this is a cleaner way of doing it, instead of getting around the Security features of OS X.
sudo gem install -n /usr/local/bin cocoapods
Original Answer
I'm assuming you're running OS X 10.11.
This is happening because Apple has enabled rootless on the new install.
If you type:
sudo nvram boot-args="rootless=0"; sudo reboot
in terminal.app
, your computer will reboot with it disabled.
Once that is done, type:
sudo gem install cocoapods -V
the -V
is for verbose and will spit out any errors if they happen.