【发布时间】:2012-08-13 16:37:32
【问题描述】:
我正在尝试在我的 OS X Mountain Lion 上安装 ffi gem(这样我就可以运行 Octopress)并且遇到了错误。
运行gem install install ffi -v '1.0.11' 给出以下输出:
/chetanshenoy.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include... no
checking for rb_thread_blocking_region()... yes
checking for ruby_native_thread_p()... yes
checking for rb_thread_call_with_gvl()... yes
creating extconf.h
creating Makefile
make
Configuring libffi
/Volumes/Secondary - HDD/Users/chetanshenoy/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi/configure: line 642: test: too many arguments
/Volumes/Secondary - HDD/Users/chetanshenoy/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi/configure: line 642: test: too many arguments
configure: WARNING: Libtool does not cope well with whitespace in `pwd`
cd "/Volumes/Secondary - HDD/Users/chetanshenoy/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi" && make
make "AR_FLAGS=" "CC_FOR_BUILD=" "CFLAGS=" "CXXFLAGS=" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET=" "MAKE=make" "MAKEINFO=/bin/sh "/Volumes/Secondary - HDD/Users/chetanshenoy/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi/missing" --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTFLAGS=" "SHELL=/bin/sh" "exec_prefix=/usr/local" "infodir=/usr/local/share/info" "libdir=/usr/local/lib" "prefix=/usr/local" "AR=ar" "AS=as" "CC=gcc-4.2" "CXX=c++" "LD=ld" "NM=/usr/bin/nm" "RANLIB=ranlib" "DESTDIR=" all-recursive
make[2]: *** No rule to make target `HDD/Users/chetanshenoy/.rvm/gems/ruby-1.9.3-p194/gems/ffi-1.0.11/ext/ffi_c/libffi/missing --run makeinfo '. Stop.
make[1]: *** [all] Error 2
make: *** ["/Volumes/Secondary] Error 2
感谢任何帮助。
【问题讨论】:
-
你可以加入
/chetanshenoy.rvm/rubies/ruby-1.9.3-p194/config- 最好使用gist,因为这个文件很大。 -
@mpapis 这是配置:https://gist.github.com/3342924
-
这就是我的想法——这可能是
ffi安装方式的错误,ruby 没有带空格的路径记录,您是否尝试过ffi的最新或预版本? -
是的,我认为这是一个错误。不幸的是,Octopress 的依赖项之一需要
ffi的特定版本。我会尝试想出一个解决方法。谢谢,如果您有任何其他想法,请告诉我。 -
您对
$HOME中的空格使用“修复”,您可以尝试以其他方式修复它:sudo rm -rf /chetanshenoy.rvm && sudo mv "/Volumes/Secondary - HDD/Users/chetanshenoy/.rvm" /chetanshenoy.rvm