Install Jekyll error error:failed to build gem native extension with gem install Jekyll command

Source: Internet
Author: User
Tags ffi
Problem Description:

Under the Ubuntu system, the Ruby development environment is installed first through the command sudo apt-get install Ruby, and then with the command-line gem install Jekyll install the GitHub page's development tool Jekyll, encountered an error message: Failed to build gem native extension details are as follows:

Error:  Error installing Jekyll:
    error:failed to build gem native extension.

    Current directory:/var/lib/gems/2.3.0/gems/ffi-1.9.18/ext/ffi_c
/usr/bin/ruby2.3-r./ SITECONF20170316-3892-175H62N.RB extconf.rb
mkmf.rb can ' t find header files for Ruby at/usr/lib/ruby/include/ Ruby.h

extconf failed, exit code 1

Gem files would remain installed in/var/lib/gems/2.3.0/gems/ffi-1.9.18 for Insp Ection.
Results logged To/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.18/gem_make.out
Solution:

Since it's the development tool for GitHub page, it's easy to find a solution on GitHub:

This means that when you install Ruby in Ubuntu's default apt-get, you do not have Ruby-dev installed, and you need to enter sudo apt-get intall ruby-dev in terminal. Close test, problem solving.

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.