本文介绍了带有Xcode 6和10.10优胜美地的椰壳足类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最初升级到10.10和XCode6-Beta后,我尝试运行 pod update,但收到此错误:

After initially upgrading to 10.10 and XCode6-Beta, I tried to run 'pod update' and I received this error:

cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)

我尝试使用'sudo gem install cocoapods'更新Cocoapods,但收到另一个错误:

I tried to update Cocoapods using 'sudo gem install cocoapods', but received another error:

Fetching: xcodeproj-0.17.0.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing cocoapods:
ERROR: Failed to build gem native extension.

"/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby" -rubygems /Library/Ruby/Gems/2.0.0/gems/rake-10.1.1/bin/rake RUBYARCHDIR=/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext RUBYLIBDIR=/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for -std=c99 option to compiler... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers.  Check the mkmf.log file for more details.  You may need configuration options.

其他人是否能够在10.10优胜美地的Xcode 6上成功使用Cocoapods?

Has anyone else been able to successfully use Cocoapods with Xcode 6 on 10.10 Yosemite?

推荐答案


  1. 打开Xcode 6

  2. 打开首选项

  3. 单击位置选项卡

  4. 命令行工具版本更改为 Xcode 6.0

  5. 卸载cocoapods

    $ sudo gem卸载cocoapods

  6. 卸载xcodeproj
    $ sudo gem卸载xcodeproj

  7. 安装xcodeproj

    $ sudo gem install xcodeproj

  8. 安装cocoapods

    $ sudo gem install cocoapods

  9. 运行 pod --version 验证其是否有效

  1. Open Xcode 6
  2. Open Preferences
  3. Click the Locations tab
  4. Change the Command Line Tools version to Xcode 6.0
  5. Uninstall cocoapods
    $ sudo gem uninstall cocoapods
  6. Uninstall xcodeproj$ sudo gem uninstall xcodeproj
  7. Install xcodeproj
    $ sudo gem install xcodeproj
  8. Install cocoapods
    $ sudo gem install cocoapods
  9. Run pod --version to verify that it worked

这篇关于带有Xcode 6和10.10优胜美地的椰壳足类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 18:26