简体   繁体   English

安装Ruby 1.9.3时出错

[英]Error Installing Ruby 1.9.3

I am getting an error installing Ruby 1.9.3. 安装Ruby 1.9.3时出现错误。 I already have ruby 2 installed on my machine. 我的机器上已经安装了ruby 2。 I am installing it through rvm and I am getting an "Error running '__rvm_make -j 1'," in the end. 我通过rvm安装它,最后得到“运行'__rvm_make -j 1'时出错”。 I am on Mavericks. 我在小牛上。 Can some please help a newbie and point me in the right direction; 可以请一些新手帮我指出正确的方向吗? it would be much appreciated. 不胜感激。 Below is the terminal printout. 下面是终端打印输出。

~/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.

Here is the 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

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

and run: 并运行:

rvm get stable

followed by 其次是

rvm install 1.9.3

For me this work fine 对我来说,这个工作很好

I encountered the same problem. 我遇到了同样的问题。 This solution worked for me. 这个解决方案对我有用。

" If You Updated to Mac OS X Mavericks : 如果您更新到Mac OS X Mavericks
This guide covers installing Ruby and Rails on a Mac with no previous installation of a Rails development environment. 本指南涵盖了在Mac上安装Ruby和Rails的情况,而以前没有安装Rails开发环境。

If you updated to Mavericks from an earlier version of Mac OS X, and you previously installed a Rails development environment, your earlier installation remains intact. 如果您从早期版本的Mac OS X更新到Mavericks,并且先前安装了Rails开发环境,则先前的安装将保持不变。 You will need to install the new version of Xcode Command Line Tools . 您将需要安装新版本的Xcode命令行工具 If you previously installed the full Xcode package, you will need to update Xcode to the newest version (Xcode 5.01 or newer). 如果您以前安装了完整的Xcode软件包,则需要将Xcode更新到最新版本(Xcode 5.01或更高版本)。

Use this article to check if any components of your development environment need to be updated." 使用本文来检查开发环境中的任何组件是否需要更新。”

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

Then run 然后跑

$: rvm install 1.9.3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM