简体   繁体   中英

Install problems: Nokogiri on Mac OSx Mountain Lion

For some reason I cannot install Nokogiri on my MacBook for traveling.

This is short output from gem install nokogiri :

Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin12/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/jseidel/.rvm/gems/ruby-1.9.3-p327@rails3213/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin12/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/jseidel/.rvm/gems/ruby-1.9.3-p327@rails3213/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12/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.

However, I used MacPorts and it says that it's already installed:

port installed | grep lib
libxml @1.8.17_0 (active)
libxml2 @2.9.1_0 (active)

Is it getting confused because both libxml and libxml2 are installed? (Probably not.) Or is there something else going on?

I've followed the installation instructions for Nokigiri installation and that doesn't help.

Finally, I uninstalled ports libxml and libxml2 and now it fails attempting to use libiconv, having gotten past the previous XML issue it seems.

试试吧

sudo port upgrade outdated

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM