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

Problem installing Nokogiri #1667

Closed
sasatefa2009 opened this issue Jul 27, 2017 · 4 comments
Closed

Problem installing Nokogiri #1667

sasatefa2009 opened this issue Jul 27, 2017 · 4 comments

Comments

@sasatefa2009
Copy link

What is the output of gem install?
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.3.0/gems/nokogiri-1.7.2/ext/nokogiri

/usr/bin/ruby2.3 -r ./siteconf20170725-5111-trm30k.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.1.0
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** 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_BASE_NAME)2.3
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build

To see why this extension failed to compile, please check the mkmf.log which can
be found here:

/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.7.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/nokogiri-1.7.2 for
inspection.
Results logged to
/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.7.2/gem_make.out

An error occurred while installing nokogiri (1.7.2), and Bundler cannot
continue.
Make sure that gem install nokogiri -v '1.7.2' succeeds before bundling.

In Gemfile:
msfrpc-client was resolved to 1.1.0, which depends on
rex was resolved to 2.0.11, which depends on
nokogiri


And when i try ( gem install nokogiri -v '1.7.2' ) or ( gem install nokogiri ) i get the same error ^^
so the problem is with nokogiri

What are the contents of the mkmf.log file?

What operating system are you using?
Kali 2016.2

What's the output from nokogiri -v?
1.6.8.1
Can you provide a self-contained script that reproduces what you're seeing?
gem install nokogiri

@flavorjones
Copy link
Member

The error message you received says,

zlib is missing; necessary for building libxml2

Have you installed zlib?

@sasatefa2009
Copy link
Author

Indeed, that was the case. Thank you very much

codes i used to install zlib and other dependencies

sudo apt-get install libpng-dev
sudo apt-get install --reinstall zlibc zlib1g zlib1g-dev

@ouda18
Copy link

ouda18 commented Nov 19, 2018

think u

@flavorjones
Copy link
Member

I'll note for future visitors to this incident: the installation tutorial covers this and many other common setup problems.

@sparklemotion sparklemotion locked as resolved and limited conversation to collaborators Nov 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants