我已经搜索了这个问题,并一直在寻找与PC相关的资源。每次我尝试安装EventMachine的宝石,我得到这个错误:无法在mac osx雪豹上安装eventmachine
Building native extensions. This could take a while... ERROR: Error installing eventmachine: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb checking for rb_trap_immediate in ruby.h,rubysig.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 --without-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=/usr/local/bin/ruby /usr/local/lib/ruby/1.9.1/mkmf.rb:368:in
try_do': The complier failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/lib/ruby/1.9.1/mkmf.rb:446:in
try_compile' from /usr/local/lib/ruby/1.9.1/mkmf.rb:568:intry_var' from /usr/local/lib/ruby/1.9.1/mkmf.rb:816:in
block in have_var' from /usr/local/lib/ruby/1.9.1/mkmf.rb:693:inblock in checking_for' from /usr/local/lib/ruby/1.9.1/mkmf.rb:280:in
block (2 levels) in postpone' from /usr/local/lib/ruby/1.9.1/mkmf.rb:254:inopen' from /usr/local/lib/ruby/1.9.1/mkmf.rb:280:in
block in postpone' from /usr/local/lib/ruby/1.9.1/mkmf.rb:254:inopen' from /usr/local/lib/ruby/1.9.1/mkmf.rb:276:in
postpone' from /usr/local/lib/ruby/1.9.1/mkmf.rb:692:inchecking_for' from /usr/local/lib/ruby/1.9.1/mkmf.rb:815:in
have_var' from extconf.rb:16:in `'Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10 for inspection. Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out
这似乎在构建C扩展打破,我已经试过像this one,但没有运气的各种解决方案。
你是怎么安装ruby的? – Schmurfy 2011-06-18 17:03:11
我在安装XCode 3.2.6时遇到同样的问题。 – jm3 2011-10-10 03:56:42