2012-07-22 124 views
2

我一直在堆栈溢出和其他站点上阅读大量这些线程,为什么每个人都无法安装1.9.2或1.9.3 ,但过去一周他们都没有帮助我。所以我的最后一个资源是,做我自己的线索!RVM无法在Lion上安装Ruby 1.9.3:libxml2.2.dylib

安装时,我得到如下:

Pablos-MacBook-Pro:~ Pablo$ rvm install ruby-1.9.3-p194 
Installing Ruby from source to: /Users/Pablo/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)... 

ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection... 
ruby-1.9.3-p194 - #extracted to /Users/Pablo/.rvm/src/ruby-1.9.3-p194 (already extracted) 
ruby-1.9.3-p194 - #configuring 
ruby-1.9.3-p194 - #compiling 
Error running 'make ', please read /Users/Pablo/.rvm/log/ruby-1.9.3-p194/make.log 
There has been an error while running make. Halting the installation. 

而且/ruby-1.9.3-p194/make.log具有以下结尾:

installing default syslog libraries 
linking shared-object tcltklib.bundle 
ld: in /usr/local/lib/libxml2.2.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[2]: *** [../../.ext/x86_64-darwin11.4.0/tcltklib.bundle] Error 1 
make[1]: *** [ext/tk/all] Error 2 
make: *** [build-ext] Error 2 

有什么可以去上?自从我阅读了很多文章以来,我会提前回答一些问题。

  • 我运行Mac OS X Lion的
  • 我跑(我认为这是)最新版本的Xcode 4.3.3
  • 我试着这样做:CC =的/ usr/local/bin目录/ GCC-4.2 RVM安装1.9.3
  • 我尝试使用铛:RVM安装1.9.3 --with-GCC =铛,它失败,出现同样的错误,再加上它抛出一个:铿锵声:错误:不支持的选项'--with-libyaml'
  • 我可以安装1.8.x版本,但是1.9.2和1.9.3出现相同的错误。

所以,我们在这里得到了一个不错的难题。有任何想法吗?

谢谢!

回答

0

也许libxml的是建设成为32位,不能用于建筑物64位红宝石,你可以验证:

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

如果您需要与支持,以重新安装64位的情况下

+0

了那是正确的:/usr/local/lib/libxml2.2.dylib:Mach-O动态链接共享库i386 - 那么我需要重新安装这个库吗?如果是这样,我该如何安装64位版本?谢谢! – ArtPulse 2012-08-06 03:15:59

+0

您的回复使我在正确的方向上搜索。谢谢!这篇文章完全完成了这项工作:http://www.markhneedham.com/blog/2010/07/08/installing-ruby-1-9-2-with-rvm-on-snow-leopard/ – ArtPulse 2012-08-06 04:43:25

+0

好你排序它出 – mpapis 2012-08-06 04:48:41