2013-08-16 8 views
3

이 문제를 해결할 수 있습니다.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/[email protected]/gems/ffi-1.9.0 for inspection. 
Results logged to /remote/part/usern/.rvm/gems/[email protected]/gems/ffi-1.9.0/ext/ffi_c/gem_make.out 

아이디어가 있으십니까?

+0

'libffi-dev' 설치를 위해 일했다

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

하기 전에이 작업을 시도합니다. 이 배포판은 무엇입니까? – vee

+0

rhel 5.5입니다. – Harpreet

+0

'yum install libffi-devel' 시도 – vee

답변

0

gcc를 4.2로 설정해야만했습니다. 또한 ffi 버전을 Gemfile.lock에서 1.0.9로 변경했습니다.

수출 PATH =/옵션/GCC-4.2.0/빈/: $ PATH

0

안녕이는 내가 내 업데이트도 Harpreet이 언급 한 트릭 (FFI 버전 다운 그레이드)했던 GCC 컴파일러와 관련된하지만 그건 것 필요하지 FFI-1.9.3은 잘뿐만 아니라 일 : D

Gemfile.lock

ffi (1.9.3) 
    ffi (1.9.3-x86-mingw32) 

https://github.com/kennethreitz/osx-gcc-installer

1

나를

관련 문제