我正在尝试使用珠宝盒(可以使用终端,不过)在我配备了 Mountain Lion 的 MBP 上安装 Ruby 1.9.3。每次编译安装时,我都会收到错误消息:“运行 make -j4 时出错”并且 Jewelry Box 中止。我有当前版本的 XCode、Readline 和 gcc,是的,我尝试过使用 Clang 进行编译 :)
这是我的日志:
假设有问题的错误(如果您不想点击链接)是:
ld: in /usr/local/lib/libz.1.dylib, file was built for unsupported file format ( 0xce 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 0 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (x86_64): /usr/local/lib/libz.1.dylib for architecture x86_64
ld: in /usr/local/lib/libz.1.dylib, file was built for unsupported file format ( 0xce 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 0 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (x86_64): /usr/local/lib/libz.1.dylib for architecture x86_64
ld: in /usr/local/lib/libz.1.dylib, file was built for unsupported file format ( 0xce 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 0 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (x86_64): /usr/local/lib/libz.1.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../../../.ext/x86_64-darwin12.0.0/digest/md5.bundle] Error 1
make[2]: *** [../../../.ext/x86_64-darwin12.0.0/digest/sha2.bundle] Error 1
make[2]: make[1]: *** [../../../.ext/x86_64-darwin12.0.0/digest/sha1.bundle] Error 1*** [ext/digest/md5/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [ext/digest/sha2/all] Error 2
make[1]: *** [ext/digest/sha1/all] Error 2
installing default rmd160 libraries
ld: in /usr/local/lib/libz.1.dylib, file was built for unsupported file format ( 0xce 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 0 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (x86_64): /usr/local/lib/libz.1.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../../../.ext/x86_64-darwin12.0.0/digest/rmd160.bundle] Error 1
make[1]: *** [ext/digest/rmd160/all] Error 2
make: *** [build-ext] Error 2
谢谢你的帮助!同样,我有 GCC V 4.2.1、READLINE 的当前版本和 Xcode 的当前版本。