Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/21.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.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_Macos - Fatal编程技术网

Ruby 1.9.3不会安装吗?

Ruby 1.9.3不会安装吗?,ruby,macos,Ruby,Macos,我在安装Ruby 1.9.3时遇到问题,我不知道这是否重要,但我使用ML POST FACTOR在我的旧mac上运行os x 10.8 这是我得到的错误 tylers-macbook:~ Tyler$ rvm install 1.9.3 ruby-1.9.3-p547 - #removing src/ruby-1.9.3-p547.. Searching for binary rubies, this might take some time. No binary rubies availabl

我在安装Ruby 1.9.3时遇到问题,我不知道这是否重要,但我使用ML POST FACTOR在我的旧mac上运行os x 10.8

这是我得到的错误

tylers-macbook:~ Tyler$ rvm install 1.9.3
ruby-1.9.3-p547 - #removing src/ruby-1.9.3-p547..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/i386/ruby-1.9.3-p547.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/Tyler/.rvm/rubies/ruby-1.9.3-p547, this may take a while depending on your cpu(s)...
ruby-1.9.3-p547 - #downloading ruby-1.9.3-p547, this may take a while depending on your connection...
ruby-1.9.3-p547 - #extracting ruby-1.9.3-p547 to /Users/Tyler/.rvm/src/ruby-1.9.3-p547....
ruby-1.9.3-p547 - #applying patch /Users/Tyler/.rvm/patches/ruby/GH-488.patch.
ruby-1.9.3-p547 - #configuring.
Error running './configure --prefix=/Users/Tyler/.rvm/rubies/ruby-1.9.3-p547 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --disable-install-doc --enable-shared',
showing last 15 lines of /Users/Tyler/.rvm/log/1408657159_ruby-1.9.3-p547/configure.log
[2014-08-21 17:39:40] ./configure
current path: /Users/Tyler/.rvm/src/ruby-1.9.3-p547
PATH=/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/Tyler/.apportable/SDK/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/Tyler/.rvm/bin:/Users/Tyler/.rvm/bin
command(7): ./configure --prefix=/Users/Tyler/.rvm/rubies/ruby-1.9.3-p547 --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libksba:/usr/local/opt/openssl --without-tcl --without-tk --disable-install-doc --enable-shared
configure: WARNING: unrecognized options: --without-tcl, --without-tk
checking build system type... i386-apple-darwin12.0.0
checking host system type... i386-apple-darwin12.0.0
checking target system type... i386-apple-darwin12.0.0
checking whether the C compiler works... no
configure: error: in `/Users/Tyler/.rvm/src/ruby-1.9.3-p547':
configure: error: C compiler cannot create executables
See `config.log' for more details
There has been an error while running configure. Halting the installation.
谢谢你花时间帮忙

config.log

8/21/14 6:07:04.844 PM com.apple.launchd[1]: (com.apple.sleepservicesd[24476]) Exited: Killed: 9
8/21/14 6:07:04.000 PM kernel[0]: memorystatus_thread: idle exiting pid 24476 [SleepServicesD]
8/21/14 6:07:04.910 PM com.apple.launchd[1]: (com.apple.cfprefsd.xpc.daemon[21]) Exited: Killed: 9
8/21/14 6:07:05.000 PM kernel[0]: memorystatus_thread: idle exiting pid 21 [cfprefsd]
8/21/14 6:07:48.225 PM md5[26610]: BUG in libdispatch:  - 1879 - 0x1b
8/21/14 6:07:48.274 PM md5[26613]: BUG in libdispatch:  - 1879 - 0x1b

看起来您要么没有C编译器,要么正在使用的C编译器不理解RVM使用的某些标志

另外,你引用的日志是错误的。错误已记录在
/Users/Tyler/.rvm/log/1408657159_ruby-1.9.3-p547/configure.log

关于编译器。 一些用户在评论中建议安装Xcode。
在mac上进行软件开发确实需要安装Xcode(因为它还安装了其他CLI实用程序),但不应该使用默认的Xcode编译器来构建Ruby MRI 1.9.3

Xcode编译器是
clang
llvm
),但Ruby MRI 1.9只支持
gcc
(另一个较旧但广泛使用的编译器)。
虽然MRI 1.9.3确实与
clang
非官方兼容,但仍存在一些已知问题,一些模块无法正确编译(Fibers)

MRI 2.0.0添加了完整的
clang
支持

因此,如果您真的想安装MRI 1.9.3,您需要首先安装
gcc

brew update
brew install gcc-4.9

rvm install 1.9.3 --with-gcc=/usr/local/bin/gcc-4.9

上面写着“查看config.log了解更多详细信息”,那么您是否查看了config.log?如果您已经安装了xcode 6,但您不了解它,那么在这里发布它将有助于我们帮助您。好的,谢谢,我将发布您是否已使用命令行工具安装了最新的xcode?我无法安装xcode 6,因为我没有os x 10.9.x-10.10.xYou正在运行预发布的测试版操作系统。对不起,你还指望什么?