forked from sparklemotion/nokogiri
-
Notifications
You must be signed in to change notification settings - Fork 0
What to do if libxml2 is being a jerk
flavorjones edited this page Apr 9, 2013
·
9 revisions
First, please read the installation tutorial
Everything below this line on this page is severely out-of-date and should not be expected to help you, at all.
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
- Using homebrew
brew install libxml2 libxslt
brew link libxml2 libxslt
- Using fink,
- 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
- If you’re using homebrew,
gem install nokogiri
- 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
- If you’re using fink,
- For bundler, use bundle-config so “bundle” commands will use this automagically in the future!
- If you’re using fink,
bundle config build.nokogiri --with-xml2-include=/sw/include/libxml2 --with-xml2-lib=/sw/lib --with-xslt-dir=/sw
- If you’re using macports,
bundle config build.nokogiri --with-xml2-include=/opt/local/include/libxml2 --with-xml2-lib=/opt/local/lib --with-xslt-dir=/opt/local
- Using source,
bundle config build.nokogiri --with-xml2-include=/usr/local/include/libxml2 --with-xml2-lib=/usr/local/lib --with-xslt-dir=/usr/local
- If you’re using homebrew you don’t need to modify bundler’s build settings, though you might want to specify nokogiri explicitly in the Gemfile and move it to the very top of your Gemfile
- If you’re using fink,