2012-06-28 107 views
1

我試圖在Mac OS X Lion的安裝Ruby 1.9.3,同樣的方法,我發現here安裝Ruby 1.9.3故障鏗鏘

基本上它是:

rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr 

然而,這

Larson:~ andrewjl$ rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr 
clang: error: unsupported option '--with-readline' 
clang: error: unsupported option '--with-opt-dir=/Users/andrewjl/.rvm/usr' 

這是鏗鏘的問題:時間鏘在--with-readline-dir選項拋出一個錯誤?有人知道如何解決這個問題嗎?

編輯

試圖Shigeya的回答後,我得到這個錯誤:

Larson:~ andrewjl$ rvm install 1.9.3-p125 --patch xcode-debugopt-fix-r34840.diff --with-readline-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr --with-tcl-lib=/usr --with-tk-lib=/usr 
Installing Ruby from source to: /Users/andrewjl/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)... 

ruby-1.9.3-p125 - #fetching 
ruby-1.9.3-p125 - #downloading ruby-1.9.3-p125, this may take a while depending on your connection... 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 9505k 100 9505k 0  0 52267  0 0:03:06 0:03:06 --:--:-- 50727 
ruby-1.9.3-p125 - #extracting ruby-1.9.3-p125 to /Users/andrewjl/.rvm/src/ruby-1.9.3-p125 
ruby-1.9.3-p125 - #extracted to /Users/andrewjl/.rvm/src/ruby-1.9.3-p125 
Applying patch 'xcode-debugopt-fix-r34840.diff' (located at /Users/andrewjl/.rvm/patches/ruby/1.9.3/p125/xcode-debugopt-fix-r34840.diff) 
ruby-1.9.3-p125 - #autoreconf 
Error running 'autoreconf', please read /Users/andrewjl/.rvm/log/ruby-1.9.3-p125/autoreconf.log 
ruby-1.9.3-p125 - #configuring 
Error running ' ./configure --prefix=/Users/andrewjl/.rvm/rubies/ruby-1.9.3-p125 --enable-shared --disable-install-doc --with-readline --with-opt-dir=/Users/andrewjl/.rvm/usr --with-openssl --with-tcl-lib=/usr --with-tk-lib=/usr --with-libyaml --with-gcc=clang ', please read /Users/andrewjl/.rvm/log/ruby-1.9.3-p125/configure.log 
There has been an error while running configure. Halting the installation. 

這裏的日誌文件錯誤:

/usr/local/include/fuse/fuse_compat.h:69:10: fatal error: 'sys/statfs.h' file not found 
#include <sys/statfs.h> 
     ^
clang: error: unable to execute command: Broken pipe: 13 
clang: error: clang frontend command failed due to signal 2 (use -v to see invocation) 
clang: note: diagnostic msg: Please submit a bug report to http://developer.apple.com/bugreporter/ and include command line arguments and all diagnostic information. 
clang: note: diagnostic msg: Error generating preprocessed source(s). 
yes 
checking for strip... strip 
checking for prefix of external symbols... _ 
checking pthread.h usability... yes 
checking pthread.h presence... yes 
checking for pthread.h... yes 
checking for if make is GNU make... yes 
checking for nroff... /usr/bin/nroff 
.ext/include/x86_64-darwin11.4.0/ruby/config.h updated 
ruby library version = 1.9.1 
configure: creating ./config.status 
config.status: creating Makefile 
configure: WARNING: unrecognized options: --with-readline, --with-openssl, --with-tcl-lib, --with-tk-lib, --with-libyaml 
In file included from <built-in>:143: 
In file included from <command line>:1: 
In file included from /usr/local/include/fuse/fuse.h:26: 
/usr/local/include/fuse/fuse_common.h:32:2: error: #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags! 
#error Please add -D_FILE_OFFSET_BITS=64 to your compile flags! 
^ 
In file included from <built-in>:143: 
In file included from <command line>:1: 
In file included from /usr/local/include/fuse/fuse.h:857: 
/usr/local/include/fuse/fuse_compat.h:69:10: fatal error: 'sys/statfs.h' file not found 
#include <sys/statfs.h> 
     ^
clang: error: unable to execute command: Broken pipe: 13 
clang: error: clang frontend command failed due to signal 2 (use -v to see invocation) 
clang: note: diagnostic msg: Please submit a bug report to http://developer.apple.com/bugreporter/ and include command line arguments and all diagnostic information. 
clang: note: diagnostic msg: Error generating preprocessed source(s). 
configure: WARNING: unrecognized options: --with-readline, --with-openssl, --with-tcl-lib, --with-tk-lib, --with-libyaml 
config.status: creating ruby-1.9.pc 
./configure: line 18932: syntax error near unexpected token `(' 
./configure: line 18932: `  sed 's/{\$([^(){}]*)[^{}]*}//g' ${srcdir}/common.mk' 

回答

2

參考this答案。

即使ruby-1.9.3-p125和ruby-1.9.3-p194都支持clang,一般不推薦使用clang安裝Ruby。

(注意:我必須先接受編輯建議,然後編輯。非常感謝您的貢獻。)

+0

謝謝,請試試看。上次我試了一下,似乎一切正常,尤其是1.9.3-p125,不是鏗鏘聲是官方支持的嗎? –

+1

Ruby團隊努力嘗試,但不時出現新問題,不能隨着叮噹產品準備就緒,甚至在開發中它可能會給您帶來難以調試的問題。 – mpapis

+0

有沒有我可以去檢查與叮噹已知問題的任何地方?沒有注意到ruby郵件主題上的任何內容,但這可能是由於發送的郵件數量所致。 –