bru*_*077 7 ruby rubygems osx-leopard nokogiri rvm
我正在尝试在OS X Leopard(10.5.8)中的RVM托管Ruby 1.8.7安装下安装Nokogiri gem.
我收到以下错误:
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/Users/user/.rvm/rubies/ruby-1.8.7-p352/bin/ruby extconf.rb
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... yes
checking for exsltFuncRegister() in -lexslt... yes
checking for xmlHasFeature()... no
-----
The function 'xmlHasFeature' is missing from your installation of libxml2. Likely this means that your installed version of libxml2 is old enough that nokogiri will not work well. To get around this problem, please upgrade your installation of libxml2.
Please visit http://nokogiri.org/tutorials/installing_nokogiri.html for more help!
*** extconf.rb failed ***
Run Code Online (Sandbox Code Playgroud)
我通过homebrew(brew install libxml2)安装了最新的libxml2,所以我不知道还有什么可以尝试.
我尝试了Nokogiri网站上的说明,我无法让Nokogiri gem安装来识别libxml2.
根据 我安装的说明并通过homebrew链接libxml2和libxslt:
brew install libxml2 libxslt
brew link libxml2 libxslt
gem install nokogiri
Run Code Online (Sandbox Code Playgroud)
错误消息已更改,但Nokogiri安装程序抱怨缺少libxml2:
...
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... no
-----
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies
Run Code Online (Sandbox Code Playgroud)
安装的libxml2版本是2.7.8.
我尝试从homebrew安装iconv库,看看我是否可以解决错误checking for iconv_open() in iconv.h... no
,所以我运行了命令:
brew install libiconv
brew link libiconv
Run Code Online (Sandbox Code Playgroud)
完成安装后,我尝试再次安装nokogiri gem,以获取此错误消息,安装程序现在抱怨libiconv丢失
hecking 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... no
-----
libiconv is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
Run Code Online (Sandbox Code Playgroud)
我很无能为力.
根据以下说明: http: //nokogiri.org/tutorials/installing_nokogiri.html您需要使用:
brew install libxml2 libxslt
brew link libxml2 libxslt
Run Code Online (Sandbox Code Playgroud)
然后
gem install nokogiri
Run Code Online (Sandbox Code Playgroud)
你用过这些还是只用过brew install libxml2
?
归档时间: |
|
查看次数: |
5927 次 |
最近记录: |