Ruby 无法安装RedCloth

Ruby 无法安装RedCloth,ruby,gem,redcloth,Ruby,Gem,Redcloth,如标题所示,我在安装gem RedCloth时遇到问题。我下载了RubyGems v1.8.24,并使用ubuntu 12.04,以下是我的控制台日志: kuba@kuba-P5Q-SE:~$ sudo gem install RedCloth [sudo] password for kuba: Building native extensions. This could take a while... ERROR: Error installing RedCloth: ERROR

如标题所示,我在安装gem RedCloth时遇到问题。我下载了RubyGems v1.8.24,并使用ubuntu 12.04,以下是我的控制台日志:

kuba@kuba-P5Q-SE:~$ 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
kuba@kuba-P5Q-SE:~$sudo gem安装红布
库巴的[sudo]密码:
构建本机扩展。这可能需要一段时间。。。
错误:安装RedCloth时出错:
错误:无法生成gem本机扩展。
/usr/bin/ruby1.9.1 extconf.rb
/usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:在'require'中:无法加载这样的文件--mkmf(LoadError)
from/usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in'require'
来自extconf.rb:1:in`'
Gem文件仍将安装在/usr/lib/ruby/gems/1.9.1/gems/RedCloth-4.2.9中以供检查。
结果记录到/usr/lib/ruby/gems/1.9.1/gems/RedCloth-4.2.9/ext/RedCloth\u scan/gem\u make.out

我试图查看最后一个给定的文件,但当我查找它时,它打开了chrome,并给出了错误信息。(

尝试从Synaptic安装ruby1.9.1-dev包,或使用apt get

在命令提示符中: sudo apt get安装ruby1.9.1-dev


mkmf(无法加载的模块)是。

您是否考虑过使用RVM管理您的红宝石?