gpt4 book ai didi

ruby - Snow Leopard 上的 RVM : Can install 1. 8.7 没问题,但不是 1.9.3 或 1.9.2(可能是体系结构问题?)

转载 作者:数据小太阳 更新时间:2023-10-29 08:13:23 26 4
gpt4 key购买 nike

现在迷路了。这是我不断收到的错误(我最近将我的 OSX 从 Leopard 升级到 Snow Leopard):

redacted's Mac[~]$ rvm install 1.9.3
Fetching yaml-0.1.4.tar.gz to /Users/redacted/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/redacted/.rvm/src
Configuring yaml in /Users/redacted/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/redacted/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/redacted/.rvm/usr
Installing Ruby from source to: /Users/redacted/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...

ruby-1.9.3-p125 - #fetching
ruby-1.9.3-p125 - #extracted to /Users/redacted/.rvm/src/ruby-1.9.3-p125 (already extracted)
ruby-1.9.3-p125 - #configuring
ruby-1.9.3-p125 - #compiling
Error running 'make ', please read /Users/redacted/.rvm/log/ruby-1.9.3-p125/make.log
There has been an error while running make. Halting the installation.

查看日志,是这样的:

ld: in /usr/local/lib/libxml2.2.dylib, file was built for i386 which is not the architecture being linked (x86_64)

用 Google 搜索并搜索了这个网站,遵循了一些建议,包括:

1) 将 XCode 更新到 3.2.6(我在 Snow Leopard 上)。这与安装 DVD 上的 Xcode 版本不同。

2) 完全删除 MacPorts 的所有痕迹(按照这里的程序 http://www.libertypages.com/clarktech/?p=743 ),包括删除我的 MacPort 东西以前所在的/opt/local

3) 完全删除 RVM 的所有痕迹(按照这里的程序 How can I remove RVM (Ruby Version Manager) from my system? )

4) 为 Snow Leopard 安装 MacPorts,并运行 sudo port -v selfupdate

5) sudo port install libxml2 libxslt(我确认它似乎使用的是 x86_64 架构 - 这是 libxml2 的样子:

--->  Computing dependencies for libxml2
---> Dependencies to be installed: zlib
---> Fetching archive for zlib
---> Attempting to fetch zlib-1.2.6_0.darwin_10.x86_64.tbz2 from http://packages.macports.org/zlib
---> Attempting to fetch zlib-1.2.6_0.darwin_10.x86_64.tbz2.rmd160 from http://packages.macports.org/zlib
---> Installing zlib @1.2.6_0
---> Activating zlib @1.2.6_0
---> Cleaning zlib
---> Fetching archive for libxml2
---> Attempting to fetch libxml2-2.7.8_0.darwin_10.x86_64.tbz2 from http://packages.macports.org/libxml2
---> Attempting to fetch libxml2-2.7.8_0.darwin_10.x86_64.tbz2.rmd160 from http://packages.macports.org/libxml2
---> Installing libxml2 @2.7.8_0
---> Activating libxml2 @2.7.8_0
---> Cleaning libxml2

6) 安装RVM

7) 至此,我的库文件,RVM,MacPorts,XCode 似乎是最新且正确的架构

8) rvm install 1.8.7 成功

9) rvm install 1.9.2 和 1.9.3 失败,错误信息显示在这个问题的开头。

有什么我错过的想法吗?我在阅读文章中尝试各种尝试时注意到了这一点:

file /usr/local/lib/libxml2.2.dylib

/usr/local/lib/libxml2.2.dylib: Mach-O dynamically linked shared library i386

不确定这是否重要。奇怪的是,当 MacPorts 似乎安装了 x86_64 版本时,它仍然认为 libxml2 是 i386。

-> 在我发布这篇文章后大约 21 分钟进行编辑 - 实际上,我认为 macport 文件是 64 位的,所以当 rvm 尝试安装 1.9.2/时,库文件路径是否可能设置错误1.9.3? (见下文)

file /opt/local/lib/libxml2.2.dylib
/opt/local/lib/libxml2.2.dylib: Mach-O 64-bit dynamically linked shared library x86_64

这是我的路径:

redacted's Mac[~]$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/Users/redacted/.rvm/bin

虚拟机信息:

system:

system:
uname: "Darwin redacted-macbook-pro.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386"
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.10.3 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]"
updated: "3 hours 26 minutes 47 seconds ago"

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

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

environment:
PATH: "/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/Users/redacted/.rvm/bin"
GEM_HOME: ""
GEM_PATH: ""
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: ""
gemset: ""

此时不知道如何进行;我基本上卸载并重新安装了两次都无济于事。

-> 编辑:为史蒂夫添加这个

[2012-02-24 22:54:41] make 
CC = /usr/bin/gcc-4.2
LD = ld
LDSHARED = /usr/bin/gcc-4.2 -dynamiclib
CFLAGS = -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-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. -I.ext/include/x86_64-darwin10.8.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/craigflannagan/.rvm/rubies/ruby-1.9.3-p125/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_* -Wl,-u,_objc_msgSend
SOLIBS =
linking miniruby
rbconfig.rb unchanged
generating enc.mk
generating prelude.c
compiling prelude.c
linking static-library libruby.1.9.1-static.a
linking shared-library libruby.1.9.1.dylib
generating encdb.h
encdb.h unchanged
making enc
make[1]: Nothing to be done for `enc'.
making srcs under enc
make[1]: Nothing to be done for `srcs'.
generating transdb.h
transdb.h unchanged
making trans
make[1]: Nothing to be done for `./enc/trans'.
making encs
installing default bug libraries
installing default resize libraries
installing default bug libraries
installing default bug libraries
installing default funcall libraries
installing default dot.dot libraries
installing default old_thread_select libraries
installing default numhash libraries
installing default string libraries
installing default wait_for_single_fd libraries
installing default bigdecimal libraries
installing default continuation libraries
installing default coverage libraries
installing default curses libraries
installing default date_core libraries
make[2]: Nothing to be done for `all'.
installing digest libraries
installing default digest libraries
installing default bubblebabble libraries
installing default md5 libraries
installing default rmd160 libraries
installing default sha1 libraries
installing default sha2 libraries
installing dl libraries
installing default dl libraries
installing default callback libraries
make[2]: Nothing to be done for `all'.
installing default etc libraries
installing default fcntl libraries
installing default fiber libraries
installing default fiddle libraries
make[2]: Nothing to be done for `all'.
installing default iconv libraries
installing default console libraries
installing default nonblock libraries
installing default wait libraries
installing default libraries
installing default generator libraries
installing default parser libraries
installing default complex libraries
installing default rational libraries
installing default nkf libraries
installing default objspace libraries
installing default openssl libraries
installing default pathname libraries
installing default psych libraries
installing default pty libraries
installing default cparse libraries
installing default readline libraries
installing default ripper libraries
checking ../.././parse.y and ../.././ext/ripper/eventids2.c
installing default sdbm libraries
installing default socket libraries
installing default stringio libraries
installing default strscan libraries
installing default syck libraries
installing default syslog libraries
linking shared-object tcltklib.bundle
ld: in /usr/local/lib/libxml2.2.dylib, file was built for i386 which is not the architecture being linked (x86_64)
collect2: ld returned 1 exit status
make[2]: *** [../../.ext/x86_64-darwin10.8.0/tcltklib.bundle] Error 1
make[1]: *** [ext/tk/all] Error 2
make: *** [build-ext] Error 2

最佳答案

问题是您只设置了 PATH 变量。但是,此环境变量不用于查找共享库。您需要设置 DYLD_LIBRARY_PATH 环境变量。也可以看看“ma​​n dyld”。

关于ruby - Snow Leopard 上的 RVM : Can install 1. 8.7 没问题,但不是 1.9.3 或 1.9.2(可能是体系结构问题?),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9440673/

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