ERROR: Error: ERROR installing rails, invalid turails

Source: Internet
Author: User

ERROR: Error: ERROR installing rails, invalid turails

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.8.2/ext/nokogiri/usr/bin/ruby2.3 -r ./siteconf20180213-11055-1aanqyp.rb extconf.rbchecking if the C compiler accepts ... yesBuilding nokogiri using packaged libraries.Using mini_portile version 2.3.0checking for gzdopen() in -lz... nozlib is missing; necessary for building libxml2*** extconf.rb failed ***Could not create Makefile due to some reason, probably lack of necessarylibraries and/or headers.  Check the mkmf.log file for more details.  You mayneed 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-buildTo 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.8.2/mkmf.logextconf failed, exit code 1Gem files will 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 I found that rails was not installed. I saw an article in Douban, so I learned how to install zlib.

$sudo apt-get install zlib1g$sudo apt-get install zlib1g.dev

Then install rails.

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.