我正在尝试在 OS X 10.9 上运行“捆绑更新”,但失败并显示以下错误消息:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
checking for ruby/util.h... *** 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.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
/Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/FrancisO/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:930:in `have_header'
from extconf.rb:14:in `<main>'
Gem files will remain installed in /Users/FrancisO/.rvm/gems/ruby-1.9.3-p392/gems/bcrypt-ruby-3.1.0 for inspection.
Results logged to /Users/FrancisO/.rvm/gems/ruby-1.9.3-p392/gems/bcrypt-ruby-3.1.0/ext/mri/gem_make.out
An error occurred while installing bcrypt-ruby (3.1.0), and Bundler cannot continue.
Make sure that `gem install bcrypt-ruby -v '3.1.0'` succeeds before bundling.
Xcode 5 (Preview 3) 已经安装,命令行工具也已安装。以下是一些相关信息:
gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.1.61) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
brew update
Already up-to-date.
rvm requirements
Installing requirements for osx, might require sudo password.
Certificates in '/usr/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
到目前为止,我在安装任何版本的 Ruby 时都没有任何问题(使用 rvm)。有人有什么主意吗?
谢谢,弗朗西斯