Cocoapods 更新版本失败,提示:“Errno::EACCES”

安装Cocoapods的时候版本还是0.36的版本,最近执行pod install的时候经常提醒我有最新版本更新了,于是就去打算更新一番。

执行pod install,结果:

CocoaPods 0.37.2 is available.

To update use: `gem install cocoapods`

For more information see http://blog.cocoapods.org

and the CHANGELOG for this version http://git.io/BaH8pQ.

于是就跟着提示在 iTerm 里面敲入 gem install cocoapods

结果是:

Fetching: cocoapods-core-0.37.2.gem (100%)

ERROR:  While executing gem ... (Errno::EACCES)

Permission denied - /Library/Ruby/Gems/2.0.0/cache/cocoapods-core-0.37.2.gem

搜索了好久,终于找到解决方案。

sudo gem install cocoapods-core

前面多加一个sudo,原来是权限的问题,主要还是对这块不熟悉,犯了一个小白的错误。


参考资料:http://www.douban.com/note/78736612/

http://blog.csdn.net/leikezhu1981/article/details/39668671

你可能感兴趣的:(Cocoapods 更新版本失败,提示:“Errno::EACCES”)