gem install nokogiri on Windows XP

81 views
Skip to first unread message

Kee Kee Mu

unread,
Mar 26, 2012, 8:37:28 AM3/26/12
to rubyonra...@googlegroups.com
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
http://nokogiri.org/tutorials/installing_nokogiri.html 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

--
Posted via http://www.ruby-forum.com/.

Luis Lavena

unread,
Mar 26, 2012, 11:44:07 AM3/26/12
to rubyonra...@googlegroups.com
On Monday, March 26, 2012 9:37:28 AM UTC-3, Ruby-Forum.com User wrote:
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
http://nokogiri.org/tutorials/installing_nokogiri.html 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 Lavena

Nicklas af Ekenstam

unread,
Mar 26, 2012, 8:42:33 AM3/26/12
to rubyonra...@googlegroups.com
On Mon, Mar 26, 2012 at 2:37 PM, Kee Kee Mu <li...@ruby-forum.com> wrote:
> 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
> http://nokogiri.org/tutorials/installing_nokogiri.html 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

ruby LED

unread,
Mar 27, 2012, 6:03:43 AM3/27/12
to rubyonra...@googlegroups.com
do you have dev-tool installed? just checking.
Reply all
Reply to author
Forward
0 new messages