我已经被这个问题困扰了几个小时,但是仍然无法找到解决方案。我正在运行Mavericks,并安装了Xcode 5.0.2(它带有命令行工具)。
我的环境:
- 使用带有Ruby版本1.9.3p484的RVM - Xcode 5.0.2 - Mac OS 10.9.1 - Gem 2.2.0 - Bundler版本1.3.5
使用sudo gem install cocoapods输出:
这是否是因为找不到CoreFoundation,或者使用了不同版本的Ruby?非常感谢您的任何帮助或意见。
我的环境:
- 使用带有Ruby版本1.9.3p484的RVM - Xcode 5.0.2 - Mac OS 10.9.1 - Gem 2.2.0 - Bundler版本1.3.5
使用sudo gem install cocoapods输出:
kyles-mbp-2:fresh-driver-ios kylechronis$ sudo gem install cocoapods
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
/Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/bin/ruby -rubygems
/Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/gems/rake- 0.9.2.2/bin/rake RUBYARCHDIR=/Users/kylechronis/.rvm/rubies/ruby-1.9.3- p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-13/1.9.1/xcodeproj-0.14.1 RUBYLIBDIR=/Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-13/1.9.1/xcodeproj-0.14.1
/Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/bin/ruby extconf.rb
checking for -std=c99 option to compiler... yes
checking for CoreFoundation... no
checking for main() in -lCoreFoundation... no
CoreFoundation is needed to build the Xcodeproj C extension.
*** 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.
这是否是因为找不到CoreFoundation,或者使用了不同版本的Ruby?非常感谢您的任何帮助或意见。
sudo gem install cocoapods
。上述命令仅使其在安装时所在的同一目录中工作。请注意,这也符合Cocoapods网站上的安装说明。 - abbood