2012-07-22 123 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