public
Description: Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser with XPath and CSS selector support.
Home | Edit | New

What to do if libxml2 is being a jerk

If you’re having install issues on OSX with libxml2,

  • make sure you’ve installed libxml2 and libxslt along with their dev packages.
    • Using fink,
sudo fink install libxml2 libxml2-shlibs libxml2-bin libxslt libxslt-shlibs libxslt-bin
  • Using macports,
sudo port install libxml2 libxslt
  • Specify the libxml2 and libxslt dirs for the installer.
    • If you’re using fink,
gem install nokogiri -- --with-xml2-include=/sw/include/libxml2 --with-xml2-lib=/sw/lib --with-xslt-dir=/sw
  • If you’re using macports,
gem install nokogiri -- --with-xml2-include=/opt/local/include/libxml2 --with-xml2-lib=/opt/local/lib --with-xslt-dir=/opt/local
  • Using source,
    For help installing nokogiri with libxml & libxslt built from source see here: use-libxml-from-source
    gem install nokogiri -- --with-xml2-include=/usr/local/include/libxml2 --with-xml2-lib=/usr/local/lib --with-xslt-dir=/usr/local
Last edited by promedical, Thu Sep 17 20:58:15 -0700 2009
Home | Edit | New
Versions: