无法安装一些宝石

时间:2013-11-21 22:06:31

标签: ruby linux ubuntu gem

我尝试在Linux下安装一些gem(roo)。

# uname -a Ubuntu-1304-raring-64-minimal 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

但是回复了错误:

# gem install roo
Building native extensions.  This could take a while...
ERROR:  Error installing roo:
    ERROR: Failed to build gem native extension.

  /usr/local/rvm/rubies/ruby-2.0.0-p195/bin/ruby extconf.rb

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.0.0-p195/gems/nokogiri-1.6.0 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.0.0-p195/gems/nokogiri-1.6.0/ext/nokogiri/gem_make.out

为什么?

1 个答案:

答案 0 :(得分:0)

您使用需要ruby-dev包的系统Ruby来安装本机扩展。我建议切换到任何版本管理器,如RVM或rbenv。之后,此错误应该消失。