[英]Cocoapods with Xcode 5 and 10.10 Yosemite
After initially upgrading to 10.10 and XCode6-Beta, I tried to run 'pod update' and I received this error: 最初升级到10.10和XCode6-Beta后,我尝试运行“ pod update”,但收到此错误:
cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)
I tried to update Cocoapods using 'sudo gem install cocoapods', but received another error: 我尝试使用'sudo gem install cocoapods'更新Cocoapods,但收到另一个错误:
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.
Even though I have installed XCode 6, I would like to use XCode 5 at this time because I want to make releases. 即使我已经安装了XCode 6,由于我想发布版本,所以我现在仍想使用XCode 5。
Related: Cocoapods with Xcode 6 and 10.10 Yosemite 相关: 带有Xcode 6和10.10优胜美地的椰壳足类
You'll need to reinstall the cocoapod gem and use XCode6's Command Line Tools, as specified by this answer. 您需要重新安装cocoapod gem并使用XCode6的命令行工具( 如此答案所指定)。 Then you can do a pod install and continue to use XCode5.
然后,您可以进行Pod安装并继续使用XCode5。 Just open the xcworkspace created in XCode5 instead of XCode6Beta.
只需打开在XCode5中创建的xcworkspace而不是XCode6Beta。
Simply deleting ~/.rvm folder resolves the problems that arise from ruby/library version, ACL, and configuration conflicts. 只需删除〜/ .rvm文件夹即可解决由ruby /库版本,ACL和配置冲突引起的问题。 All your gems will have to be reinstalled but this is the simplest and cleanest solution I know of that works with Xcode 5. Just run
您所有的gems都必须重新安装,但这是我所知道的最简单,最干净的解决方案,它可以在Xcode 5中使用。只需运行
> sudo rm -rf ~/.rvm
in s.hell. 在地狱中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.