0

我已经安装了它显示错误的gem:

 gem install --local /home/harish/Downloads/json-1.8.0.gem 
Building native extensions.  This could take a while...
ERROR:  Error installing /home/harish/Downloads/json-1.8.0.gem:
    ERROR: Failed to build gem native extension.

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


Gem files will remain installed in /home/harish/.gem/ruby/1.9.1/gems/json-1.8.0 for inspection.
Results logged to /home/harish/.gem/ruby/1.9.1/gems/json-1.8.0/ext/json/ext/generator/gem_make.out
4

1 回答 1

4

我假设您使用的是 Debian 衍生产品。尝试这个:

sudo apt-get install ruby1.9-dev

对于 Fedora,试试这个:

sudo yum install ruby-devel
于 2013-07-07T16:16:43.770 回答