Libxml2 is missing for Nokogiri after installing xcode on mavericks osx

I try to install nokogiri gem on mavericks and get an error:

checking for xmlParseDoc() in -lxml2... no
-----
libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.

Libxml2 installs through homebrew. I installed xcode as suggested in other stackoverflow questions, but the problem remains.

+4
source share
1 answer

I needed to clearly indicate its location, as well as the icon. That was a few weeks ago, but I seem to remember that it was like this:

gem install nokogiri -- --with-xml2-lib=[path on your system] --with-xml2-include=[path on your system] --with-iconv-dir=[path on your system]

This is for me (OSX 10.9):

gem install nokogiri -- --with-xml2-lib=/opt/local/lib --with-xml2-include=/opt/local/include/libxml2 --with-iconv-dir=/usr/local
+2
source

Source: https://habr.com/ru/post/1539343/


All Articles