How to get cocoapods work on Yosemite
查看原文:http://leancodingnow.com/how-to-get-cocoapods-work-on-yosemite/
今天升级了Mac OS X 10.10-Yosemite以后运行pod install
遇到下面的错误: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in 'mkdir': Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14 (Errno::EACCES)
一番折腾后找到解决方案如下:
-
分别执行下面命令卸载cocoapods和xcodeproj,如果你的机器上面有多个版本,选择
All versions
卸载$ sudo gem uninstall cocoapods
$ sudo gem uninstall xcodeproj
-
分别执行下面命令安装xcodeproj和cocoapods
$ sudo gem install xcodeproj
$ sudo gem install cocoapods
接下来尝试执行pod install
,如果您还遇到下面的错误Error loading the plugin with path '/Library/Ruby/Gems/2.0.0/gems/cocoapods-plugins-0.3.1/lib/cocoapods_plugin.rb'.
Errno::EACCES - Permission denied - /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14
运行命令$ gem update --system
即可。
如果您还遇到这样的错误Unable to load a specification for the plugin '/Library/Ruby/Gems/2.0.0/gems/cocoapods-try-release-fix-0.1.2'
,运行命令sudo gem uninstall cocoapods-try-release-fix
后再运行sudo gem install cocoapods
。
其它博文:
More blog posts on http://leancodingnow.com/
欢迎关注我的微信公众号
Hope this helps,
Michael
作者:Benjamin Wang
出处:http://chunhui588.cnblogs.com
版权声明: 本文欢迎转载,但需在文章页面明显位置给出本文的详细链接,否则作者将保留追究法律责任的权利。