我的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相关问答推荐

使用Mac命令行解密用Ruby加密的Zip

如何使用Ruby中的时区函数S标准库?

RSpec:为什么 `instance_double` 可以与 StandardError 一起使用,但不能与其他异常类一起使用?

使用 Sorbet RBI 时需要 Elem

使用数组作为其中之一转换键和值

冒号:和粗箭头=>有什么区别

Ruby 中有内置的二进制搜索吗?

有效的Electron邮件地址正则表达式?

就地修改 ruby​​ 哈希(rails strong params)

从字符串中删除所有特殊字符 - ruby

我可以使用 `else if` 而不是 `elsif` 吗?

如何在数组中找到出现次数最多的项目

获取下周一(或一周中的任何一天)的日期的 Ruby 代码

如何在 Mac OS X Lion 中安装 Ruby 1.9.3?

Ruby 方法to_sym有什么作用?

我安装了一个 gem,但 require 'gemname' 不起作用.为什么?

Ruby 哈希白名单过滤器

遍历数组的前 n 个元素

相当于 Ruby 的 cURL?

如何在 Ubuntu 12.04 上正确安装 ruby​​ 2.0.0?