加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-16 20:45:44 所属栏目:百科 来源:网络整理
导读:我试图在我的新ubuntu机器上设置rails env.但是我正在安装nokogiri宝石时遇到麻烦.我已经安装了libxslt和libxml2 libs thourgh rvm pkg命令以及使用apt-get.我以为是显示我的libxslt是错误的错误. Building native extensions. This could take a while...ER
我试图在我的新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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读