Running 'compile' for libxslt 1.1.28... OK Running 'install' for libxslt 1.1.28... OK Activating libxslt 1.1.28 (from /Users/Kartik/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.4.1/ports/x86_64-apple-darwin14.0.0/libxslt/1.1.28)... checking for main() in -llzma... yes checking for xmlParseDoc() in libxml/parser.h... no checking for xmlParseDoc() in -lxml2... no checking for xmlParseDoc() in -llibxml2... no
libxml2 is missing. Please locate mkmf.log to investigate how it is failing.
*** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
OS X comes with libxml2 installed, but it's in /usr/include/libxml2 . So that needs to be added to the include path with a -I/usr/include/libxml2 . The headers contain the definitions of the various functions, but the real code lies in shared libraries.
Locate where you can get the latest version of the software. (From google, libxml2 webpage is here: http://www.xmlsoft.org/downloads.html. From there, you can find the ftp location where you can download the software.
You can use an existing directory which is already in the path, such as C:\WINDOWS . You can also create a new directory for libxml and place the files there, but be sure to modify the PATH environment variable and add that new directory to its list.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With