在RVM Mac OS X上安装Ruby 1.9.2时出现问题 [英] Trouble Installing Ruby 1.9.2 with RVM Mac OS X

查看:187
本文介绍了在RVM Mac OS X上安装Ruby 1.9.2时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的无知表示歉意-我对此很陌生-但我尝试了所有操作,但无法使用RVM安装1.9.2.我相信我已经正确安装了RVM,并且当我去安装1.9.2时,当ruby尝试编译时,我的make日志中出现以下错误:

I apologize for my ignorance - I'm very new to this - but I have tried everything and cannot get 1.9.2 installed using RVM. I believe I have installed RVM correctly, and when I go to install 1.9.2 I get the following error in my make log when ruby tries to compile:

ld: in /usr/local/lib/libz.1.dylib, file was built for unsupported file format which is   
not the architecture being linked (x86_64) for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [../../../.ext/x86_64-darwin10.6.0/digest/md5.bundle] Error 1
make: *** [mkmain.sh] Error 1

一些其他信息:我以32位运行OS X,并且收到了类似的错误-用我相信的(i36)替换(x86_64).我现在以64位运行.

Some other information: I was running OS X in 32 bit, and received a similar error - replace the (x86_64) with I believe (i36). I am now running in 64 bit.

我已经完成TinMan要求我做的所有事情,但仍然无济于事-只想指出我可以安装1.8.7很好.尝试安装1.9.1和1.9.2会显示以下错误消息:

I have done everything TinMan has asked me to do, and still no avail - Just want to point out that I can install 1.8.7 just fine. Attempting to install 1.9.1 and 1.9.2 gives me the following error message:

`Installing Ruby from source to: /Users/tl/.rvm/rubies/ruby-1.9.2-p180, this may take a   while depending on your cpu(s)...

ruby-1.9.2-p180 - #fetching 
ruby-1.9.2-p180 - #downloading ruby-1.9.2-p180, 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 8609k  100 8609k    0     0   655k      0  0:00:13  0:00:13 --:--:--  939k
ruby-1.9.2-p180 - #extracting ruby-1.9.2-p180 to /Users/tl/.rvm/src/ruby-1.9.2-p180
ruby-1.9.2-p180 - #extracted to /Users/tl/.rvm/src/ruby-1.9.2-p180
ruby-1.9.2-p180 - #configuring 
ruby-1.9.2-p180 - #compiling 
ERROR: Error running 'make ', please read /Users/tl/.rvm/log/ruby-1.9.2-p180/make.log
ERROR: There has been an error while running make. Halting the installation.`

此外,我还升级了autoconf,automake,m4和libtools.

Additionally, I have upgraded my autoconf, automake, m4, and libtools.

最后,我的路径和.bash_profiles分别如下:

Lastly, my path and .bash_profiles respectively look like:

路径

`/usr/local/upgraded/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin`

.bash

`export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"`

*更新2 *

我按照此处的说明更新了autoconf,automake,m4和libtools: http://tom.meinlschmidt.org/2010/11/22/upgrade-autoconfautomake-in-osx/

*Update 2*

I updated my autoconf, automake, m4, and libtools following the instructions here: http://tom.meinlschmidt.org/2010/11/22/upgrade-autoconfautomake-in-osx/

RVM信息: 系统:

RVM Info: `system:

 system:
   uname:       "Darwin Tam-Les-MacBook-Pro.local 10.6.0 Darwin Kernel Version 10.6.0:  Wed Nov 10 18:11:58 PST 2010; root:xnu-1504.9.26~3/RELEASE_X86_64 x86_64"
   bash:        "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
   zsh:         "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"

 rvm:
   version:      "rvm 1.5.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]"

 homes:
   gem:          "not set"
   ruby:         "not set"

 binaries:
   ruby:         "/usr/bin/ruby"
   irb:          "/usr/bin/irb"
   gem:          "/usr/bin/gem"
   rake:         "/usr/bin/rake"

 environment:
   PATH:          "/usr/local/upgraded/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/opt/local/bin:/Users/tl/.rvm/bin:/Users/tl/.rvm/bin"
   GEM_HOME:     ""
   GEM_PATH:     ""
   MY_RUBY_HOME: ""
   IRBRC:        ""
   RUBYOPT:      ""
   gemset:       ""`

此外,您的PATH看起来也不像允许RVM初始化自身.初始化RVM后,它将首先将其路径放入〜/.rvm.

Also, your PATH doesn't look like RVM has been allowed to initialize itself. When RVM has been initialized it will put its path to your ~/.rvm first.

您如何做到的?我真的很陌生,并且通过纯粹的猜测工作已经走到了这一步.我知道效率低下.

How do you do that? I'm really new to this, and have gotten this far through sheer guess work. Inefficient I know.

大家好-自从我放弃这已经有一段时间了,但是本周末我将再次尝试.感谢您的所有建议,我会告诉您发生了什么.对于像我这样的新手,我严重低估了仅安装某些东西的难度.

Hi all - it's been a while since I've given up on this, but I am going to try again this weekend. Thanks for all the advice and I'll let you know what happens from there. For a newbie such as myself, I severely underestimated how difficult just installing something is.

推荐答案

我不知道您是否还在使用它,但我仅通过执行以下操作即可成功实现::

I don't know if you're still on it, but i succeeded just by doing this ::

sudo rm /usr/local/lib/libz.*

:)

可能某些软件安装了错误的库...错误的​​体系结构

Probably some software has installed a wrong lib... Well wrong architecture

这篇关于在RVM Mac OS X上安装Ruby 1.9.2时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆