似乎可以绕过这个问题。
$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有什么想法吗?
发布于 2015-07-18 04:11:39
在此之前尝试一下
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
apt-get install ruby{version}-dev
bundle install ffi这对我很管用
发布于 2013-08-23 03:29:49
我不得不将gcc设置为4.2,它起作用了。我还在Gemfile.lock中将ffi版本更改为1.0.9。
导出路径=/opt/gcc-4.2.0/bin/:$PATH
发布于 2013-11-19 08:07:20
嗨,这与我更新的GCC编译器有关,我也做了Harpreet提到的技巧(ffi版本降级),但没有必要ffi-1.9.3也能正常工作:D
在Gemfile.lock中
ffi (1.9.3)
ffi (1.9.3-x86-mingw32)https://github.com/kennethreitz/osx-gcc-installer
click here github repo with the .pkg installer for all OS (not only MacOSX)
https://stackoverflow.com/questions/18283291
复制相似问题