Error installing Rails on Linux Mint

0

When running sudo gem install rails, I received this error message:

Building native extensions.  This could take a while...
ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/nokogiri-1.7.0.1/ext/nokogiri
/usr/bin/ruby2.3 -r ./siteconf20170305-1916-hney9w.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.

I checked libxml2, it is installed

    
asked by anonymous 05.03.2017 / 16:13

1 answer

-1

Take a look at this script:

RVM uses this script to install the dependencies needed to install the most common gems in ubuntu, hence the mint.

Installing the packages listed there will solve your problem.

    

06.03.2017 / 13:15