views:

51

answers:

1

Trying to install a gem, but it can't find the headers, despite specifying them:

sudo gem install nokogiri -- --with-xml2-lib=/usr/local/lib --with-xml2-include=/usr/local/include/libxml2  --with-xml2-include=/usr/local/include/libxml2  --with-xslt-include=/usr/local/include/libxslt
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
    ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb --with-xml2-lib=/usr/local/lib --with-xml2-include=/usr/local/include/libxml2 --with-xml2-include=/usr/local/include/libxml2 --with-xslt-include=/usr/local/include/libxslt
checking for #include <libxml/parser.h>
... no
-----
libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.

The /usr/local/include/libxml2/libxml/parser.h file does exist, so I don't see why this isn't working.

EDIT: I'm on Centos 5.4

A: 

http://wiki.github.com/tenderlove/nokogiri/what-to-do-if-libxml2-is-being-a-jerk

karlphillip
Sorry, I'm on Centos 5.4, updated my question. I did see the Centos instructions, and installed from source as suggested in case of issues.
ehsanul