Installation of Nokogiri fails

Ubuntu 10.04
Ruby ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

I need to install Nokogiri but the installation fails with an error that
follows.

Building native extensions. This could take a while…
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.

    /home/soichi/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb

checking for libxml/parser.h… no

libxml2 is missing. please visit
Installing Nokogiri - Nokogiri for help with
installing dependencies.

*** 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.

But I have certainly installed libxml2, where I can check it with sudo
apt-get install libxml2.

Could anyone help me out here?

It says, “Check the mkmf.log…”, does anyone know where the file
resides?

soichi

On 07/16/2012 09:56 AM, Soichi I. wrote:

Ubuntu 10.04
Ruby ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

[snip]

libxml2 is missing.

You need to install the required development files as well:

$ sudo apt-get install libxml2-dev libxslt1-dev

On Mon, Jul 16, 2012 at 12:56 AM, Soichi I. [email protected]
wrote:

Ubuntu 10.04

*** extconf.rb failed ***

It says, “Check the mkmf.log…”, does anyone know where the file
resides?

Your main question was already answered but for future reference:

$ find $GEM_HOME -type f -name ‘mkmf.log’ -print