错误安装调试器linecache:错误:无法构建GEM本机扩展



我正在尝试捆绑安装,但它显示上述错误或调试器。请从终端找到详细的错误

Installing debugger-linecache (1.1.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
        /usr/local/ruby/bin/ruby extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
Makefile creation failed
************************************************************************** 
No source for ruby-1.9.2-p0 provided with debugger-ruby_core_source gem.
**************************************************************************
*** 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/ruby/bin/ruby
        --with-ruby-dir
        --without-ruby-dir
        --with-ruby-include
        --without-ruby-include=${ruby-dir}/include
        --with-ruby-lib
        --without-ruby-lib=${ruby-dir}/lib

Gem files will remain installed in /usr/local/ruby/lib/ruby/gems/1.9.1/gems/debugger-linecache-1.1.1 for inspection.
Results logged to /usr/local/ruby/lib/ruby/gems/1.9.1/gems/debugger-linecache-1.1.1/ext/trace_nums/gem_make.out 
An error occured while installing debugger-linecache (1.1.1), and Bundler cannot continue.
Make sure that `gem install debugger-linecache -v '1.1.1'` succeeds before bundling.

如果我在终端中键入Ruby-V,我会得到 ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]

如果我做gem install debugger-linecache,我仍然会遇到相同的错误。如何解决。请帮助??

我的错误非常相似,但是在Ruby 1.9.3上。跑步:

gem install debugger-linecache -v '1.1.2' -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p286/

让它为我工作。归功于此答案。

i解决了简单

的类似问题(升级Ruby 1.9.3至2.0)
bundle update debugger

结果安装了GEM版本1.6.0

相同的修复,还有更多最新的

# check ruby version with rvm info
gem install debugger-linecache -v '1.1.2' 
-- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p448

在ubuntu上13.04(如果很重要)。

我必须:gem安装debugger -ruby_core_source -v 1.1.2

然后:宝石安装调试器

然后我的捆好的完成。

感谢有关此问题的评论。

最新更新