无法在 ubuntu 12.04 中安装 nokogiri [英] unable to install nokogiri in ubuntu 12.04
本文介绍了无法在 ubuntu 12.04 中安装 nokogiri的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在我的新 ubuntu 机器上设置 rails env.但是我在安装 nokogiri gem 时遇到了麻烦.我已经安装了 libxslt 和 libxml2 libs thourgh rvm pkg 命令以及使用 apt-get.我认为它向我显示 libxslt 丢失错误.
I am trying to setup rails env on my new ubuntu machine. But I am facing trouble while install nokogiri gem.. I have installed libxslt and libxml2 libs thourgh rvm pkg command as well as using apt-get. I thought it is showing me libxslt is missing error.
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
I am using rvm setup and ruby 1.9.3
推荐答案
试试这个:
# nokogiri requirements
sudo apt-get install libxslt-dev libxml2-dev
gem install nokogiri
这篇关于无法在 ubuntu 12.04 中安装 nokogiri的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文