Skip to content

Instantly share code, notes, and snippets.

@FrozenCanuck
Created November 10, 2011 19:04
Show Gist options
  • Save FrozenCanuck/1355784 to your computer and use it in GitHub Desktop.
Save FrozenCanuck/1355784 to your computer and use it in GitHub Desktop.
[Ruby] Error trying to install ffi gem
When attempting to install ffi gem:
$ gem install ffi
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
/Users/fc/.rvm/rubies/ruby-1.9.2-p290/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.
When attempting to compile ffi from source (https://github.com/ffi/ffi):
$ rake gem:install
rake-compiler must be configured first to enable cross-compilation
rake-compiler must be configured first to enable cross-compilation
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
[warn] YARD unavailable
Successfully built RubyGem
Name: ffi
Version: 1.0.10
File: ffi-1.0.10.gem
mv ffi-1.0.10.gem ../ffi-1.0.10.gem
sudo gem install --local pkg/ffi-1.0.10
Building native extensions. This could take a while...
ERROR: Error installing pkg/ffi-1.0.10:
ERROR: Failed to build gem native extension.
/Users/fc/.rvm/rubies/ruby-1.9.2-p290/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.
Both done on Mac OS X 10.7.2 using Ruby v1.9.2-p290. Xcode 4.2 is installed.
@simardcasanova
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment