无法安装ruby-debug-base

时间:2015-01-31 05:27:05

标签: macos ruby-on-rails-4 ruby-debug

我在Mac OS X上,我尝试安装ruby-debug-base,但我收到错误:

$ sudo gem install ruby-debug-base
Password:
Fetching: rbx-require-relative-0.0.9.gem (100%)
Successfully installed rbx-require-relative-0.0.9
Fetching: linecache-0.46.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug-base:
    ERROR: Failed to build gem native extension.

    /Users/Apple/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150131-1058-139jyp3.rb extconf.rb
Can't handle 1.9.x yet
*** 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/Apple/.rvm/rubies/ruby-2.1.5/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in /Users/Apple/.rvm/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/linecache-0.46 for inspection.
Results logged to /Users/Apple/.rvm/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-11/2.1.0/linecache-0.46/gem_make.out

1 个答案:

答案 0 :(得分:0)

您可能必须指定安装ruby源的位置,例如:

gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=/Users/Apple/.rvm/rubies/ruby-2.1.5