获取libxml2.2.dylib“文件不是必需的体系结构"时出错. [英] Getting error for libxml2.2.dylib "file is not of required architecture"

查看:85
本文介绍了获取libxml2.2.dylib“文件不是必需的体系结构"时出错.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用rvm在运行Snow Leopard的Mac上安装Ruby 1.9.2.

I'm trying to use rvm to install Ruby 1.9.2 on my Mac running Snow Leopard.

我的.bash_profile包含

ARCHFLAGS="-arch x86_64"

要安装ruby,请运行:

To install ruby, I run:

rvm install 1.9.2 -C --enable-shared

编译时出现错误.这是make.error.log:

I get an error during compiling. Here is the make.error.log:

[2010-01-20 10:03:00] make 
ld: in /usr/local/lib/libxml2.2.dylib, file is not of required architecture
collect2: ld returned 1 exit status
make[1]: *** [../../.ext/i386-darwin10.2.0/tcltklib.bundle] Error 1
make: *** [mkmain.sh] Error 1

我从源代码安装了readline,并尝试了如下安装:

I installed readline from source and tried the install like this:

rvm install 1.9.2 -C --enable-shared,--with-readline-dir=/usr/local 

导致了与以前相同的错误.

which resulted in the same error as before.

rcltklib.bundle文件的位置为:

The locations of the rcltklib.bundle file is:

/usr/local/lib/ruby/1.8/i686-darwin9.7.0/tcltklib.bundle  

(我认为该文件是Ruby OSX安装的一部分)

(I think this file is part of the Ruby OSX installation)

推荐答案

现在,终于我明白了.
我确实从 ruby​​osx 安装了ruby 1.8.7,似乎有一些损坏的库​​,rvm用来编译它的ruby.

Now, finally I figured it out.
I did install ruby 1.8.7 from rubyosx and there seemed to be some broken libraries, which rvm used to compile its rubies.

解决方案是从/usr/local中移除rubyosx红宝石.

The solution is to remove the rubyosx ruby from /usr/local.

不太麻烦的解决方案是在使用rvm进行编译时仅重命名/usr/local文件夹.之后,您可以重新命名它,并且可以按预期工作.

The less drastic solution is to just rename the /usr/local folder during compiling with rvm. Afterwards you can name it back and it works as expected.

很高兴,现在可以使用.

Glad it works now.

这篇关于获取libxml2.2.dylib“文件不是必需的体系结构"时出错.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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