gpt4 book ai didi

ruby - 使用 RVM Mac OS X 安装 Ruby 1.9.2 时遇到问题

转载 作者:数据小太阳 更新时间:2023-10-29 06:36:40 27 4
gpt4 key购买 nike

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

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,并收到类似的错误 - 将 (x86_64) 替换为我相信 (i36)。我现在运行 64 位。

*更新*:

我已经完成了 TinMan 要求我做的所有事情,但仍然无济于事 - 只是想指出我可以安装 1.8.7 就好了。尝试安装 1.9.1 和 1.9.2 时出现以下错误消息:

`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。

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

路径

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

.庆典

`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/

RVM 信息: `系统:

 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: ""`

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.

你是怎么做到的?我对此很陌生,并且通过纯粹的猜测工作已经走了这么远。我知道效率低下。

*更新3*

大家好 - 我放弃这个已经有一段时间了,但这个周末我会再试一次。感谢您提供的所有建议,我会让您知道接下来会发生什么。对于像我这样的新手,我严重低估了安装东西的难度。

最佳答案

我不知道你是否还在坚持,但我这样做就成功了::

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

:)

可能某些软件安装了错误的库...错误的架构

关于ruby - 使用 RVM Mac OS X 安装 Ruby 1.9.2 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5426892/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com