ruby - 如何在需要必要的库和/或 header 时安装 ruby​​-debug

标签 ruby ruby-debug

我的 Rails 是 3.2.1.4,Ruby 是 1.9.3p448

我在安装 ruby-debug 时遇到错误:

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

    /home/hxh/.rvm/rubies/ruby-1.9.3-p448/bin/ruby 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=/home/hxh/.rvm/rubies/ruby-1.9.3-p448/bin/ruby


Gem files will remain installed in /home/hxh/.rvm/gems/ruby-1.9.3-p448/gems/linecache-0.46 for inspection.
Results logged to /home/hxh/.rvm/gems/ruby-1.9.3-p448/gems/linecache-0.46/ext/gem_make.out

谁能告诉我错误在哪里?

最佳答案

错误在 mkmf.log 文件中。该文件应位于 /home/hxh/.rvm/gems/ruby-1.9.3-p448/gems/linecache-0.46/ext/linecache/mkmf.log

如果没有,你可以使用

sudo find / -name mkmf.log

找到它。

要进一步排除故障,请参阅“How to install Nokogiri Ruby gem with mkmf.log saying libiconv not found?

关于ruby - 如何在需要必要的库和/或 header 时安装 ruby​​-debug,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19697359/

相关文章:

ruby - 在 Ruby 中调用 Yield 时出现 Stack Level Too Deep 错误

ruby-on-rails - ruby rails : debugging rake tasks

ruby-debug - 错误 : installing ruby-debug-ide

javascript - 将 Ruby 代码移植到 JavaScript 时出现 "Call stack size exceeded"

ruby-on-rails - 为什么我的 AptanaStudio3.0 无法调试 Rails 应用程序?

ruby-debug - 无法在已安装ruby 1.9.2和1.9.3的win7上安装gem ruby​​-debug19

ruby - 如何让 ruby​​ 调试器使用 shotgun 在 sinatra 中工作?

使用 instance_eval 改进 Ruby

c - ruby 内联 : Error: too few arguments to function

ruby-on-rails - 如何将两个 Rails 应用程序数据库和模型链接在一起?