Har*_*shi 15 ubuntu ruby-on-rails nokogiri
我正在尝试在我的新ubuntu机器上设置rails env.但是我在安装nokogiri gem时遇到了麻烦..我已经安装了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.
-----
Run Code Online (Sandbox Code Playgroud)
编辑
我正在使用rvm setup和ruby 1.9.3
Ben*_*Hao 23
试试这个:
# nokogiri requirements
sudo apt-get install libxslt-dev libxml2-dev
gem install nokogiri
Run Code Online (Sandbox Code Playgroud)
rds*_*oze 10
对于Ruby 1.9.3和2.0,需要libxslt-dev和libxml2-dev.
sudo apt-get install libxslt-dev libxml2-dev
这对我有用:
安装nokogiri的依赖项
sudo apt-get install libxslt-dev libxml2-dev
确保nokogiri使用系统库
export NOKOGIRI_USE_SYSTEM_LIBRARIES=1
使用--verbose选项安装nokogiri,以便更好地理解任何问题
gem install --verbose nokogiri
小智 5
在14.0.4上,使用RVM,您需要:
sudo apt-get install -y libgmp-dev
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11622 次 |
| 最近记录: |