在osx yosemite上安装ruby-debug gem时出错

时间:2015-08-12 15:48:45

标签: ruby macos

有人在osx yosmite中成功安装ruby-debug吗?我的mac上有ruby 2.2.1和rvm 1.26.11。但是,当我尝试安装ruby-debug时,它失败并出现以下错误:

~ --> gem install ruby-debug
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug:
    ERROR: Failed to build gem native extension.

    /Users/userid/.rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20150812-26861-vlyh28.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
    --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=/Users/userid/.rvm/rubies/ruby-2.2.1/bin/$(RUBY_BASE_NAME)

extconf failed, exit code 1

Gem files will remain installed in /Users/userid/.rvm/gems/ruby-2.2.1/gems/linecache-0.46 for inspection.
Results logged to /Users/userid/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-14/2.2.0-static/linecache-0.46/gem_make.out
~ -->
  

〜 - >输入rvm | head -1 rvm是一个函数〜 - > rvm -v rvm 1.26.11   (最新)作者:Wayne E. Seguin,Michal Papis    [https://rvm.io/]〜 - > ruby -v ruby​​ 2.2.1p85   (2015-02-26修订版49769)[x86_64-darwin14]

1 个答案:

答案 0 :(得分:1)

使用该版本的Ruby,您应该使用byebug而不是ruby-debug。