Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't install libxml-ruby (2.4.0 and 2.4.6) #55

Closed
user21 opened this issue Mar 14, 2013 · 8 comments
Closed

can't install libxml-ruby (2.4.0 and 2.4.6) #55

user21 opened this issue Mar 14, 2013 · 8 comments

Comments

@user21
Copy link

user21 commented Mar 14, 2013

Hello! I am use bitnami stack redmine and want install libxml-ruby gem.

I run this command gem install -p -f libxml-ruby and get this error:

ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.

    /usr/local/redmine/ruby/bin/ruby extconf.rb

checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... yes
checking for atan() in -lm... no
checking for atan() in -lm... yes
checking for inflate() in -lz... yes
checking for iconv_open() in -liconv... yes
checking for xmlParseDoc() in -lxml2... yes
checking for libxml/xmlversion.h... no
checking for libxml/xmlversion.h in /opt/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... no
*** 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/local/redmine/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-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-mlib
--without-mlib
--with-zlib
--without-zlib
--with-iconvlib
--without-iconvlib
--with-xml2-config
--without-xml2-config
--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-xml2lib
--without-xml2lib
extconf failure: need libxml2.

Install the library or try one of the following options to extconf.rb:

  --with-xml2-config=/path/to/xml2-config
  --with-xml2-dir=/path/to/libxml2
  --with-xml2-lib=/path/to/libxml2/lib
  --with-xml2-include=/path/to/libxml2/include

Gem files will remain installed in /usr/local/redmine/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-2.4.0 for inspection.
Results logged to /usr/local/redmine/ruby/lib/ruby/gems/1.8/gems/libxml-ruby-2.4.0/ext/libxml/gem_make.out

How can i resolve this problem?
Thanks!

@cfis
Copy link
Member

cfis commented Mar 16, 2013

On linus, usually this is what works for me:

--with-xml2-include=/usr/include/libxml2

@user21
Copy link
Author

user21 commented Mar 18, 2013

Cfis thank you for reply! But i don't know, how to passing that option to gem install command(( Could you please give me example?

@cfis
Copy link
Member

cfis commented May 9, 2013

gem install libxml --- --with-xml2-include=/usr/include/libxml2

@cfis
Copy link
Member

cfis commented Aug 4, 2013

Going to close this, let me know if you still have an issue.

@cfis cfis closed this as completed Aug 4, 2013
@elgalu
Copy link

elgalu commented Nov 7, 2013

Thanks @cfis works great. Just note a small typo; there is an extra dash '-' and wrong gem name, working command with full log:

rvm use 1.9.3
#=> Using /home/user/.rvm/gems/ruby-1.9.3-p448

gem install libxml-ruby -- --with-xml2-include=/usr/include/libxml2
#=> Building native extensions with: '--with-xml2-include=/usr/include/libxml2' .... 
#=> Successfully installed libxml-ruby-2.7.0

@rubykolaveridi007
Copy link

can't install libxml-ruby - on windows

C:\Users\Downloads>gem install libxml-ruby-2.7.0.gem -- --with-xml2-in
clude=/usr/include/libxml2
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing libxml-ruby-2.7.0.gem:
ERROR: Failed to build gem native extension.

    C:/Ruby193/bin/ruby.exe extconf.rb --with-xml2-include=/usr/include/libx

ml2
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... no
checking for atan() in -lm... yes
checking for inflate() in -lz... no
checking for inflate() in -lzlib... no
checking for inflate() in -lzlib1... no
checking for inflate() in -llibz... no
*** 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=C:/Ruby193/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-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-zliblib
--without-zliblib
--with-zlib1lib
--without-zlib1lib
--with-libzlib
--without-libzlib
extconf failure: need zlib

Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/libxml-ru
by-2.7.0 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/libxml-ruby-2.7.0/ext/libx

ml/gem_make.out

@musreg
Copy link

musreg commented Aug 31, 2015

@rubykolaveridi007
Could you please share your experience, how did you fix that issue? I am getting the same error.

@taogone
Copy link

taogone commented Nov 7, 2015

I have same error like bellows. ㅠㅠ

C:\Bitnami\redmine-3.1.1-1\apps\redmine\htdocs\plugins>gem install libxml-ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.

C:/Bitnami/redmine-3.1.1-1/ruby/bin/ruby.exe extconf.rb

checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... no
checking for atan() in -lm... yes
checking for inflate() in -lz... no
checking for inflate() in -lzlib... no
checking for inflate() in -lzlib1... no
checking for inflate() in -llibz... no
*** 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=C:/Bitnami/redmine-3.1.1-1/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}/
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/
--with-socketlib
--without-socketlib
--with-nsllib
--without-nsllib
--with-mlib
--without-mlib
--with-zlib
--without-zlib
--with-zliblib
--without-zliblib
--with-zlib1lib
--without-zlib1lib
--with-libzlib
--without-libzlib
extconf failure: need zlib

Gem files will remain installed in C:/Bitnami/redmine-3.1.1-1/ruby/lib/ruby/gems/2.0.0/gems/libxml-ruby-2.8.0 for inspection.
Results logged to C:/Bitnami/redmine-3.1.1-1/ruby/lib/ruby/gems/2.0.0/gems/libxml-ruby-2.8.0/ext/libxml/gem_make.out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants