Skip to content

Instantly share code, notes, and snippets.

@kangguru
Created January 28, 2015 11:17
Show Gist options
  • Save kangguru/c5b1219433d2044e10cd to your computer and use it in GitHub Desktop.
Save kangguru/c5b1219433d2044e10cd to your computer and use it in GitHub Desktop.
packager-ruby-error
oot@ip-172-30-0-137:/opt/ruby-2.1/bin# ./gem install ffi -v '1.9.6'
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
/opt/ruby-2.1/bin/ruby 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=/opt/ruby-2.1/bin/ruby
--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
/opt/ruby-2.1/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 /opt/ruby-2.1/lib/ruby/2.1.0/mkmf.rb:587:in `try_cpp'
from /opt/ruby-2.1/lib/ruby/2.1.0/mkmf.rb:1067:in `block in have_header'
from /opt/ruby-2.1/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
from /opt/ruby-2.1/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /opt/ruby-2.1/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /opt/ruby-2.1/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from /opt/ruby-2.1/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /opt/ruby-2.1/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from /opt/ruby-2.1/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from /opt/ruby-2.1/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 /opt/ruby-2.1/lib/ruby/gems/2.1.0/gems/ffi-1.9.6 for inspection.
Results logged to /opt/ruby-2.1/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0-static/ffi-1.9.6/gem_make.out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment