Robin
Robin

Reputation: 66

When attempting to install jekyll appears an error

I'm having some trouble installing jekyll. Can't quite figure out how to patch the missing link.

Heres the full post:

root@cherob:~# gem install jekyll
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
ERROR: Failed to build gem native extension.

/usr/bin/ruby2.1 extconf.rb
checking for ffi.h... *** 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/ruby2.1
        --with-ffi_c-dir
        --without-ffi_c-dir
        --with-ffi_c-include
        --without-ffi_c-include=${ffi_c-dir}/include
        --with-ffi_c-lib
        --without-ffi_c-lib=${ffi_c-dir}/lib
        --with-libffi-config
        --without-libffi-config
        --with-pkg-config
        --without-pkg-config
/usr/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
        from /usr/lib/ruby/2.1.0/mkmf.rb:587:in `try_cpp'
        from /usr/lib/ruby/2.1.0/mkmf.rb:1067:in `block in have_header'
        from /usr/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
        from /usr/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
        from /usr/lib/ruby/2.1.0/mkmf.rb:321:in `open'
        from /usr/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
        from /usr/lib/ruby/2.1.0/mkmf.rb:321:in `open'
        from /usr/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
        from /usr/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
        from /usr/lib/ruby/2.1.0/mkmf.rb:1066:in `have_header'
        from extconf.rb:16:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.1.0/gems/ffi-1.9.18 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0

/ffi-1.9.18/gem_make.outstrong text

Ruby is installed:

root@cherob:~# ruby -v
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]

Debain 8 is installed

-

Apache2 is installed:

root@cherob:~# apache2 -v
Server version: Apache/2.4.10 (Debian)
Server built:   Sep 20 2017 04:37:43

If you have an idea I would be glad if you forward me it.

Other thanks already times in advance

Robin

Upvotes: 0

Views: 80

Answers (2)

DA.
DA.

Reputation: 849

I had the same error while installing. You will have to install des Ruby dev packacke:

sudo apt-get install ruby2.4-dev

This will install the developement package for 2.4. You should install 2.1 as you are using this version. I had the problem, that the package could not be found in the repositories. So I used the following PPA:

$ sudo apt-add-repository ppa:brightbox/ruby-ng
$ sudo apt-get update

https://launchpad.net/~brightbox/+archive/ubuntu/ruby-ng

Version 2.1 is also available in this repository.

Upvotes: 0

Stanislav Mekhonoshin
Stanislav Mekhonoshin

Reputation: 4386

Such error usually means that you don't have build tools installed. As far as I understood you are using linux, so you can run something like

apt-get install build-essential

This command is for deb-bases distros. So you can use something similar if you use a different distro.

Upvotes: 1

Related Questions