在linux上安装newgem时出错

Jas*_*zek 5 ruby linux

我试图在我的Linux机器上安装newgem(sudo gem install newgem),我收到以下错误:

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

/usr/bin/ruby1.8 extconf.rb install newgem
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/RedCloth-4.0.4 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/RedCloth-4.0.4/ext/redcloth_scan/gem_make.out
Run Code Online (Sandbox Code Playgroud)

问题是什么?

eph*_*ent 6

mkmf是一个生成Makefile的Ruby模块.它应该是标准Ruby安装的一部分,但Debian(和衍生产品)将其拆分为ruby1.8-dev包.

如果mkmf.rb在输出的任何目录中找不到ruby -e'print $:.join("\n")',那么你应该弄清楚你需要安装什么.