2008-10-08 70 views
5

安裝newgem我想在我的Linux機器上安裝newgem(sudo的創業板安裝newgem)和我收到以下錯誤:錯誤在Linux上

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 

還有什麼問題呢?

回答

6

mkmf是生成Makefiles的Ruby模塊。它應該是標準Ruby安裝的一部分,但Debian(和衍生產品)將其分解到ruby1.8-dev包中。

如果您在ruby -e'print $:.join("\n")'輸出的任何目錄中找不到mkmf.rb,那麼您應該弄清楚您需要安裝什麼。