Gem install nokogiri on Windows XP

I issue the command “gem install nokogiri” on Windows XP console. I use
Cygwin.
And, I got the following errors, please help.

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

    /usr/bin/ruby.exe 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.

Provided configuration options:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/usr/bin/ruby
–with-zlib-dir
–without-zlib-dir
–with-zlib-include
–without-zlib-include=${zlib-dir}/include
–with-zlib-lib
–without-zlib-lib=${zlib-dir}/lib
–with-iconv-dir
–without-iconv-dir
–with-iconv-include
–without-iconv-include=${iconv-dir}/include
–with-iconv-lib
–without-iconv-lib=${iconv-dir}/lib
–with-xml2-dir
–without-xml2-dir
–with-xml2-include
–without-xml2-include=${xml2-dir}/include
–with-xml2-lib
–without-xml2-lib=${xml2-dir}/lib
–with-xslt-dir
–without-xslt-dir
–with-xslt-include
–without-xslt-include=${xslt-dir}/include
–with-xslt-lib
–without-xslt-lib=${xslt-dir}/lib

Gem files will remain installed in
/usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.2 for inspection.
Results logged to
/usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.2/ext/nokogiri/gem_make.out

On Monday, March 26, 2012 9:37:28 AM UTC-3, Ruby-Forum.com User wrote:

    /usr/bin/ruby.exe extconf.rb

checking for libxml/parser.h… no

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

I believe the error message is pretty clear.

You need to install libxml2 in your cygwin installation to be able to
install nokogiri. See the installation document for other dependencies.

–
Luis L.

On Mon, Mar 26, 2012 at 2:37 PM, Kee Kee Mu [email protected]
wrote:

checking for libxml/parser.h… no

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

Try adding libxml2 to cygwin using the cygwin’s setup.exe. You may
also have to add a few other libraries along the way but I’m sure you
will be notified of these as well.

  • Nille

do you have dev-tool installed? just checking.