最近把mac系统升级到10.11系统,可是在用pod install命令的时候,却提示command not found.后来上网查了下才知道,Cocoapods在10.11系统上发生了变化。app
在stackoverflow搜到的解释是这样的,This is happening because Apple has enabled rootless on the new install,也就是说在10.11系统上苹果已经启用无根的安装。在这种状况下,若是你使用以下的命令:less
sudo gem install cocoa pods -v
就会出现这样的提示:spa
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod。
为了解决上面提到的问题,以及Cocoapods在OS X 10.11系统上的正常使用,咱们须要在命令行输入这样一句话,命令行
sudo gem install -n /usr/local/bin cocoapods
这样就能解决Cocoapods在10.11系统上出现的问题了。
code