2013-01-09 69 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为我工作。谢谢。 –