How to get cocoapods work on Yosemite

查看原文:http://leancodingnow.com/how-to-get-cocoapods-work-on-yosemite/swift

今天升級了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)xcode

一番折騰後找到解決方案以下:ruby

  1. 分別執行下面命令卸載cocoapods和xcodeproj,若是你的機器上面有多個版本,選擇All versions卸載 
    $ sudo gem uninstall cocoapods微信

    $ sudo gem uninstall xcodeprojpost

  2. 分別執行下面命令安裝xcodeproj和cocoapods 
    $ sudo gem install xcodeprojthis

    $ sudo gem install cocoapodscode

接下來嘗試執行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-14blog

運行命令$ gem update --system便可。ci

若是您還遇到這樣的錯誤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 cocoapodsget

其它博文:

More blog posts on http://leancodingnow.com/ 

歡迎關注個人微信公衆號

 

Hope this helps, Michael

相關文章
相關標籤/搜索