0

我正在尝试安装 rails,但有一些问题: ruby 2.0.0 rvm 1.19.6 gems 2.0.3 bundler 1.2.3 当我运行 'bundle install' 或 'gem install json -v "1.7.7"' 时,我有:


Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9 extconf.rb 
mkmf.rb can't find header files for ruby at /usr/lib64/ruby/include/ruby.h


Gem files will remain installed in /home/Hiken/.bundler/tmp/16909/gems/json-1.7.7 for inspection.
Results logged to /home/Hiken/.bundler/tmp/16909/gems/json-1.7.7/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.7.7), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.7'` succeeds before bundling.

当我使用 ruby​​ 1.9.3 时,我遇到了同样的错误。请帮帮我

4

2 回答 2

2

我和你有同样的问题。问题出现了,因为您的本地机器上没有 ruby​​-dev 和 sqlite-dev 库。试试安装”

于 2013-05-03T13:36:31.177 回答
0

我通过快速 google 找到了关于缺少 Ruby 头文件的答案:

“许多包被​​分成'foo'和'foo-devel',其中'foo-devel'有头文件。有没有可以安装的'ruby-devel'包?”

是否有可以安装并重试的开发工具包?

于 2013-05-03T12:54:41.147 回答