Unable to install eventmachine on mac osx snow leopard

I searched for this problem and continued to find PC related resources. Every time I try to install an eventmachine gem, I get this error:

Create your own extensions. This may take some time ... ERROR: Error installing eventmachine: ERROR: Failed to create native gem extension.

/ usr / local / bin / ruby ​​extconf.rb checking for rb_trap_immediate in ruby.h, rubysig.h ... * extconf.rb failed * Failed to create Makefile for some reason, probably the lack of necessary libraries and / or headers. Check the mkmf.log file for more information. Details You may need configuration options.

The configuration options provided are: --with-opt-dir --without-opt-dir --with-manual include --without-manual include = $ {Blocker dir} / enable --with-manual PB --without-manual = $ {non-automatic 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►6868:in try_var' from /usr/local/lib/ruby/1.9.1/mkmf.rb:816:in block in has_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), deferred 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 deferred 'from / usr / local / lib / ruby ​​/ 1.9.1 / mkmf.rb: 254: in block open' from /usr/local/lib/ruby/1.9.1/mkmf.rb:276:in ' 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 has_var 'from extconf.rb: 16:in ``

Gem /usr/local/lib/ruby/gems/ 1.9.1/gems/eventmachine-0.12.10 . , /usr/local/lib/ruby/gems/ 1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out

, c-, , , .

+3
4

XCode 3.2 4 , . XCode DVD .

App Store 10.7 .

0

, , Xcode 4.2/4.3.

Xcode 4.2.x 4.3.x , :

  • Xcode "" "Xcode" .
  • "" ().
  • "" " " (, )

, cc --version :

% cc --version

Apple clang version 3.1 (tags/Apple/clang-318.0.54) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.3.0
Thread model: posix

Ruby 1.9.3, EventMachine. . http://isitruby19.com/eventmachine. 1.9.2 , eventmachine RVM rbenv.

0

I had the same problem. Opening the mkmf.log file and running the command narrowed the problem to the gmp library. The gmp library was in a different directory, and LD_LIBRARY_PATH was not installed. So I set LD_LIBRARY_PATH to the location where gmp was, and then it was set correctly.

0
source

All Articles