ruby-on-rails – 无法在ubuntu 12.04中安装nokogiri

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – 无法在ubuntu 12.04中安装nokogiri前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图在我的新ubuntu机器上设置rails env.但是我正在安装nokogiri宝石时遇到麻烦.我已经安装了libxslt和libxml2 libs thourgh rvm pkg命令以及使用apt-get.我以为是显示我的libxslt是错误错误.
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
    ERROR: Failed to build gem native extension.

        /home/hacker5/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb --with-xslt-include=/usr/include/libxslt
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... no
-----
libxslt is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----

编辑

我使用rvm设置和ruby 1.9.3

解决方法

尝试这个:
# nokogiri requirements
sudo apt-get install libxslt-dev libxml2-dev
gem install nokogiri

猜你在找的Ruby相关文章