Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
安装Ruby 1.9.3时出现的问题_Ruby_Rvm_Clang_Readline_Bsd - Fatal编程技术网

安装Ruby 1.9.3时出现的问题

安装Ruby 1.9.3时出现的问题,ruby,rvm,clang,readline,bsd,Ruby,Rvm,Clang,Readline,Bsd,我正在尝试在Mac OS X Lion上安装Ruby 1.9.3,方法与我发现的相同: 基本上是: rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr 但是,这次Clang在--with readline dir选项上抛出一个错误: Larson:~ andrewjl$ rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr c

我正在尝试在Mac OS X Lion上安装Ruby 1.9.3,方法与我发现的相同:

基本上是:

rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr
但是,这次Clang在
--with readline dir
选项上抛出一个错误:

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'
这是叮当声的问题吗?有人知道怎么避开这件事吗

编辑

在尝试了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'
/usr/local/include/fuse/fuse\u compat.h:69:10:致命错误:“未找到sys/statfs.h”文件
#包括
^
叮当声:错误:无法执行命令:管道断裂:13
clang:错误:由于信号2,clang前端命令失败(使用-v查看调用)
叮当声:注意:诊断信息:请向http://developer.apple.com/bugreporter/ 并包括命令行参数和所有诊断信息。
叮当声:注意:诊断消息:生成预处理源时出错。
对
正在检查带。。。带
正在检查外部符号的前缀_
正在检查pthread.h可用性。。。对
正在检查pthread.h是否存在。。。对
正在检查pthread.h。。。对
正在检查make是否为GNU make。。。对
正在检查nroff/usr/bin/nroff
.ext/include/x86_64-darwin11.4.0/ruby/config.h已更新
ruby库版本=1.9.1
配置:创建./config.status
config.status:正在创建Makefile
配置:警告:无法识别的选项:-使用readline,-使用openssl,-使用tcl lib,-使用tk lib,-使用libyaml
文件包括:143:
包含在以下文件中:1:
在/usr/local/include/fuse/fuse.h中包含的文件中:26:
/usr/local/include/fuse/fuse_common.h:32:2:错误:#错误请在编译标志中添加-D_FILE_OFFSET_BITS=64!
#错误请将-D\u FILE\u OFFSET\u BITS=64添加到编译标志中!
^
文件包括:143:
包含在以下文件中:1:
在/usr/local/include/fuse/fuse.h:857中包含的文件中:
/usr/local/include/fuse/fuse_compat.h:69:10:致命错误:“未找到sys/statfs.h”文件
#包括
^
叮当声:错误:无法执行命令:管道断裂:13
clang:错误:由于信号2,clang前端命令失败(使用-v查看调用)
叮当声:注意:诊断信息:请向http://developer.apple.com/bugreporter/ 并包括命令行参数和所有诊断信息。
叮当声:注意:诊断消息:生成预处理源时出错。
配置:警告:无法识别的选项:-使用readline,-使用openssl,-使用tcl lib,-使用tk lib,-使用libyaml
config.status:正在创建ruby-1.9.pc
/配置:第18932行:意外标记“(”附近的语法错误
/配置:第18932行:`sed's/{\$([^(){}]*)[^{}]*}//g'${srcdir}/common.mk'
参考答案

尽管ruby-1.9.3-p125和ruby-1.9.3-p194都对clang提供了一些支持,但通常不建议使用clang安装ruby


(注意:我必须先接受编辑建议,然后再进行编辑。非常感谢您的贡献。)

谢谢,我将尝试一下。上次我尝试时,一切似乎都很好,特别是从1.9.3-p125开始,clang是否得到了官方支持?Ruby团队努力了,但新问题不时出现,clang还没有做好生产准备,甚至在开发过程中,它也会给您带来难以调试的问题。我可以去哪里查看关于clang的已知问题?没有注意到ruby邮件线程上的任何内容,但这可能是由于发送的邮件量太大。可能是在ruby dev上(我没有订阅它),但@mapis向我展示了Ruby bug tracker上的一个问题:@shigeya感谢您在这方面的帮助,我安装了autoconf和automake,openssl,但我想安装p194,如果我只是将p194换成p125,安装方向行得通吗?