Ubuntu Install rails error: Error:error installing Rails:__ubuntu

Source: Internet
Author: User
Building native extensions.
This is 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.8.2/ext/nokogiri/usr/bin/ruby2.3-r./ SITECONF20180213-11055-1AANQYP.RB extconf.rb Checking if the C compiler accepts ... yes building Nokogiri using packaged L
Ibraries. Using mini_portile version 2.3.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 NE  Cessary libraries and/or headers.  Check the Mkmf.log file for more details.

Your 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--wit Hout-zlib-dir--with-zlib-include--without-zlib-include=${zlib-dir}/include--with-zlib-lib--without-zli B-lib=${zlib-dir}/lib--enable-cross-build--disable-cross-build to the why this extension failed to compile, ple ASE Check the Mkmf.log which can be found here:/VAR/LIB/GEMS/2.3.0/EXTENSIONS/X86_64-LINUX/2.3.0/NOKOGIRI-1.8.2/MKMF.L OG extconf failed, exit code 1 GEM files would remain installed in/var/lib/gems/2.3.0/gems/nokogiri-1.8.2 for inspection
.
 Results logged To/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/nokogiri-1.8.2/gem_make.out

Then found rails did not install up, see an article in watercress, so common sense installation zlib

$sudo apt-get Install zlib1g
$sudo apt-get Install Zlib1g.dev

Then you install rails and you succeed.

PS: If there is any problem when installing zlib, you can go to see the article of watercress.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.