安装nokogiri xmlParseDoc检查失败

时间:2014-06-25 17:57:49

标签: ruby-on-rails ruby

操作系统:10.9.3 ruby版本管理:rbenv

我按照

中提到的步骤进行操作 酿造0.9的

http://nokogiri.org/tutorials/installing_nokogiri.html。已安装0.9.5。安装时获取以下错误日志。

请帮忙修理。以下是日志:

System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin13.2.0/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /Users/parag/.bundler/tmp/65816/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.2.0/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin13.2.0/ports/libxslt/1.1.26... OK
Running 'configure' for libxslt 1.1.26... OK
Running 'compile' for libxslt 1.1.26... OK
Running 'install' for libxslt 1.1.26... OK
Activating libxslt 1.1.26 (from /Users/parag/.bundler/tmp/65816/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.2.0/libxslt/1.1.26)...
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... yes
checking for xmlParseDoc() in -lxml2... no
-----
libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

1 个答案:

答案 0 :(得分:0)

您需要安装几个不同的软件包。试试这个:

sudo apt-get install libxslt-dev libxml2-dev