2
gem install unf_ext -v '0.0.6'
localhost:workflow_boyun ryan007$ gem install unf_ext -v '0.0.6'
Building native extensions.  This could take a while...
ERROR:  Error installing unf_ext:
    ERROR: Failed to build gem native extension.

        /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
checking for main() in -lstdc++... *** 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/ryan007/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
    --with-stdc++lib
    --without-stdc++lib
/Users/ryan007/.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/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:461:in `try_link0'
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:476:in `try_link'
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:619:in `try_func'
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:845:in `block in have_library'
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
    from /Users/ryan007/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:840:in `have_library'
    from extconf.rb:2:in `<main>'


Gem files will remain installed in /Users/ryan007/.rvm/gems/ruby-1.9.3-p392@rails3.2.8/gems/unf_ext-0.0.6 for inspection.
Results logged to /Users/ryan007/.rvm/gems/ruby-1.9.3-p392@rails3.2.8/gems/unf_ext-0.0.6/ext/unf_ext/gem_make.out
slm
  • 15,396
  • 12
  • 109
  • 124
ryan007
  • 85
  • 1
  • 7

1 Answers1

4

I update my mac os to 10.9 last Sunday,but I forgot command line tools. when I check my xcode,I do not find "command line tools".In the end, some one told me "Run xcode-select --install".Then I fellow him,and it works.I installed "command line tools", everything goes well.hope my answer can help u

ryan007
  • 85
  • 1
  • 7
  • I found that `xcode-select` ran OK, but did not help me with the gem. (I'm installing the `debugger` gem in OS X 10.9.1, Ruby 1.9.3.) What worked was installing the command-line tools package from Apple Developer Tools, as described in [Xcode 4.4 and later install Command Line Tools](http://stackoverflow.com/questions/9329243/xcode-4-4-and-later-install-command-line-tools), so try that too. – Hew Wolff Jan 16 '14 at 00:06