我搜寻了相关的资源,但都是关于PC的。
每次我尝试安装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:in
`try_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:in
`block 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:in
`open' 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:in
`open' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:276:in
`postpone' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:692:in
`checking_for' from
/usr/local/lib/ruby/1.9.1/mkmf.rb:815:in
`have_var' from extconf.rb:16:in
`<main>'
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扩展时似乎出现了错误。我尝试了各种解决方案,比如 "Mac OS X Leopard安装ruby gem eventmachine",但是没有成功。