微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

安装ffi时出错

似乎可以解决这个问题。

$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

有任何想法吗?

实现一个外部函数接口的指南

找不到FFI错误模块

传递CString后跟一个int的FFI错误

GHC:奇怪条件下的分割错误

如何使从OPAM提供给OCaml的库安装?

尝试之前

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

它为我工作

我不得不将gcc设置为4.2,它工作。 我也在Gemfile.lock中将ffi版本更改为1.0.9。

export PATH = / opt / gcc-4.2.0 / bin /:$ PATH

嗨,这与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

点击这里github回购与所有操作系统的.pkg安装程序(不仅MacOSX)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐