安装Ruby 1.9.3时出错

时间:2013-11-06 23:11:02

标签: ruby

我在安装Ruby 1.9.3时遇到错误。我已经在我的机器上安装了ruby 2。我通过rvm安装它,我得到一个“错误运行'__rvm_make -j 1',”最后。我在小牛队。有些人可以帮助一个新手并指出我正确的方向;非常感谢。下面是终端打印输出。

~/coding: rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3-p448.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
ellie password required for 'softwareupdate -l': 

Checking requirements for osx.
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: port definitions are more than two weeks old, consider using selfupdate
Certificates in '/opt/local/etc/openssl/cert.pem' already are up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/ellie/.rvm/rubies/ruby-1.9.3-p448, this may take a while                            depending on your cpu(s)...
ruby-1.9.3-p448 - #downloading ruby-1.9.3-p448, this may take a while depending on your connection...
ruby-1.9.3-p448 - #extracting ruby-1.9.3-p448 to /Users/ellie/.rvm/src/ruby-1.9.3-p448
ruby-1.9.3-p448 - #extracted to /Users/ellie/.rvm/src/ruby-1.9.3-p448
ruby-1.9.3-p448 -             #configuring....................................................................................................................................................................................................................................................................................................................................................................................................................................................................
ruby-1.9.3-p448 - #post-configuration
ruby-1.9.3-p448 -     #compiling...............................................................................................................
Error running '__rvm_make -j 1',
please read /Users/ellie/.rvm/log/1383778714_ruby-1.9.3-p448/make.log
There has been an error while running make. Halting the installation.

这是make log

[2013-11-06 18:18:58] __rvm_make
__rvm_make () 
{ 
    \make "$@" || return $?
}
current path: /Users/ellie/.rvm/src/ruby-1.9.3-p448
command(3): __rvm_make -j 1
        CC = clang
        LD = ld
    LDSHARED = clang -dynamiclib
    CFLAGS = -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-                    missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-    to-32 -Wimplicit-function-declaration  -fno-common -pipe 
    XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
    CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/opt/local/include -I. -I.ext/include/x86_64-darwin13.0.0 -I./include -I.
    DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/ellie/.rvm/rubies/ruby-1.9.3-p448/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1  -Wl,-u,_objc_msgSend   
    SOLIBS = 
linking miniruby
<internal:prelude>:1: [BUG] Segmentation fault
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin13.0.0]

-- Control frame information -----------------------------------------------
c:0003 p:0002 s:0006 b:0006 l:000005 d:000005 TOP    <internal:prelude>:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000b28 d:000b28 TOP   

-- Ruby level backtrace information ----------------------------------------
<internal:prelude>:1:in `<compiled>'

-- C level backtrace information -------------------------------------------

   See Crash Report log file under ~/Library/Logs/CrashReporter or
   /Library/Logs/CrashReporter, for the more detail of.

-- Other runtime information -----------------------------------------------

* Loaded script: ./miniruby

* Loaded features:

    0 enumerator.so

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

make: *** [.rbconfig.time] Abort trap: 6

2 个答案:

答案 0 :(得分:5)

对于Xcode的Mavericks OS X安装(来自https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-)命令行工具(OS X Mavericks) - 2013年10月下旬

并运行:

rvm get stable

接着是

rvm install 1.9.3

对我来说,这项工作很好

答案 1 :(得分:1)

我遇到了同样的问题。这个解决方案对我有用。

如果您已更新为Mac OS X Mavericks
本指南介绍如何在Mac上安装Ruby和Rails,而不安装Rails开发环境。

如果您从早期版本的Mac OS X更新到Mavericks,并且之前安装了Rails开发环境,则您之前的安装仍然完好无损。您需要安装新版本的Xcode Command Line Tools。如果您以前安装了完整的Xcode软件包,则需要将Xcode更新到最新版本(Xcode 5.01或更新版本)。

使用本文检查是否需要更新开发环境的任何组件。“

来源: http://railsapps.github.io/installrubyonrails-mac.html

然后运行

$: rvm install 1.9.3