# Cannot install ruby gem 'libxml-ruby'

**URL:** <https://www.ruby-forum.com/t/cannot-install-ruby-gem-libxml-ruby/87345>\
**Category:** Ruby\
**Created:** [March 1, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/cannot-install-ruby-gem-libxml-ruby/87345 "2007-03-01T22:18:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Stevens\_SIAmAI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ad7895/32.png) [@Dan\_Stevens\_SIAmAI](https://www.ruby-forum.com/u/Dan_Stevens_SIAmAI)\
**Post date:** [March 1, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/cannot-install-ruby-gem-libxml-ruby/87345/1 "2007-03-01T22:18:45Z")

</div>

I am having trouble installing the ruby gem ‘libxml-ruby’. The output,  
which I am struggling to understand, is below. It appears that I  
require some ‘dependencies’, which is confusing because I thought  
RubyGems was supposed to deal with dependencies. In addition, zlib is  
part of the standard library so I don’t understand why I ‘need zlib’  
either.

Any assistance would be greatly appreciated.

> gem install libxml-ruby  
> Building native extensions. This could take a while…  
> ERROR: While executing gem … (Gem::Installer::ExtensionBuildError)  
> ERROR: Failed to build gem native extension.

ruby extconf.rb install libxml-ruby  
checking for socket() in socket.lib… no  
checking for gethostbyname() in nsl.lib… no  
checking for atan() in m.lib… yes  
checking for inflate() in z.lib… no  
checking for inflate() in zlib1.lib… no  
extconf failure: need zlib  
\*\*\* 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  
–srcdir=.  
–curdir  
–ruby=c:/ruby/bin/ruby  
–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-zlib-dir  
–without-zlib-dir  
–with-zlib-include  
–without-zlib-include=${zlib-dir}/include  
–with-zlib-lib  
–without-zlib-lib=${zlib-dir}/lib  
–with-socketlib  
–without-socketlib  
–with-nsllib  
–without-nsllib  
–with-mlib  
–without-mlib  
–with-zlib  
–without-zlib  
–with-zlib1lib  
–without-zlib1lib

Gem files will remain installed in  
c:/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8.4 for inspection.  
Results logged to  
c:/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8.4/ext/xml/gem\_make.out
