Libxml2 missing mac os x 10.10 Libxml2 missing mac os x 10.10 ruby ruby

Libxml2 missing mac os x 10.10


i fiddled around with this for quite a while and the following worked for me..

1) install libxml2 with homebrew

brew install libxml2

2) install the gem via

sudo env ARCHFLAGS="-arch x86_64" gem install nokogiri:1.6.4.1 -- --use-system-libraries --with-xml=/usr/local/Cellar/libxml2/


For any who are still getting "libxml2 version 2.6.21 or later is required!" message, removing --use-system-libraries from hlv's step 2 above, worked for me.

sudo env ARCHFLAGS="-arch x86_64" gem install nokogiri:1.6.4.1 -- --with-xml=/usr/local/Cellar/libxml2/2.9.2/


I finally ended up with this version independent line:

sudo env ARCHFLAGS="-arch x86_64" gem install nokogiri  -n /usr/local/bin -- --with-xml=/usr/local/Cellar/libxml2/