3

これを回避できるようです。

$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

何か案は?

4

3 に答える 3

1

前にこれを試してください

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

bundle install ffi

それは私のために働いた

于 2015-07-17T20:11:38.900 に答える
0

gcc を 4.2 に設定する必要がありましたが、うまくいきました。また、Gemfile.lock で ffi のバージョンを 1.0.9 に変更しました。

エクスポート PATH=/opt/gcc-4.2.0/bin/:$PATH

于 2013-08-22T19:29:49.050 に答える