2013-01-09 90 views
4

在標題中,我安裝寶石RedCloth時出現問題。我下載RubyGems的v1.8.24,並使用Ubuntu 12.04,這裏是我的控制檯日誌:不能安裝RedCloth

[email protected]:~$ sudo gem install RedCloth 
[sudo] password for kuba: 
Building native extensions. This could take a while... 
ERROR: Error installing RedCloth: 
    ERROR: Failed to build gem native extension. 

     /usr/bin/ruby1.9.1 extconf.rb 
/usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load  such file -- mkmf (LoadError) 
    from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from extconf.rb:1:in `<main>' 


Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/RedCloth-4.2.9 for  inspection. 
Results logged to /usr/lib/ruby/gems/1.9.1/gems/RedCloth- 4.2.9/ext/redcloth_scan/gem_make.out 

我試圖尋找到這最後給定的文件,但是當我看着它,它會打開鍍鉻,並給了我錯誤。:(

+0

您是否考慮過使用RVM來管理您的紅寶石? – sunnyrjuneja

+0

當然我會嘗試... – Leo

回答

15

嘗試從新立得安裝ruby1.9.1-dev軟件包,或者使用apt-get的

在命令提示符: 命令和apt-get安裝ruby1.9.1-dev的

MKMF (未能加載的模塊)爲only included in the development package for ruby on ubuntu

+0

它的工作,我愛你! – Leo

+0

謝謝,很高興它爲你工作:) –

+0

apt-get install ruby​​-dev爲我工作。謝謝。 –