Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing ffi

Tags:

linux

ruby

ffi

Can seem to get around this.

$gem install ffi
Building native extensions.  This could take a while...
ERROR:  Error installing ffi:
ERROR: Failed to build gem native extension.

/remote/part/usern/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for rb_thread_blocking_region()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
checking for ffi_prep_cif_var()... no
creating extconf.h
creating Makefile

make
libffi.gnu.mk:16: Extraneous text after `else' directive
libffi.gnu.mk:18: *** only one `else' per conditional.  Stop.


Gem files will remain installed in /remote/part/usern/.rvm/gems/ruby-1.9.3-p448@myrailsapp/gems/ffi-1.9.0 for inspection.
Results logged to /remote/part/usern/.rvm/gems/ruby-1.9.3-p448@myrailsapp/gems/ffi-1.9.0/ext/ffi_c/gem_make.out

Any ideas?

like image 911
blue01 Avatar asked May 11 '26 03:05

blue01


1 Answers

try this before

sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
apt-get install ruby{version}-dev

bundle install ffi

it worked for me

like image 97
Arun Panneerselvam Avatar answered May 12 '26 18:05

Arun Panneerselvam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!