2012-05-06 144 views
1

我在Mac OS 10.6.8上使用RVM 1.13.4,XCode 3.2.6。升級到雪豹是相當新的,我相信那是當我開始有這個問題。RVM:在雪豹上安裝libyaml軟件包時遇到問題

當我運行rvm pkg install libyaml,我得到以下錯誤:

Fetching yaml-0.1.4.tar.gz to /Users/tsherif/.rvm/archives 
Extracting yaml-0.1.4.tar.gz to /Users/tsherif/.rvm/src 
Prepare yaml in /Users/tsherif/.rvm/src/yaml-0.1.4. 
Configuring yaml in /Users/tsherif/.rvm/src/yaml-0.1.4. 
Compiling yaml in /Users/tsherif/.rvm/src/yaml-0.1.4. 
Error running 'make ', please read /Users/tsherif/.rvm/log/yaml/make.log 


Database file /Users/tsherif/.rvm/config/packages does not exist. 

不知道這個故事是如何處理config/packages。該make.log文件包含以下內容:

[2012-05-06 05:37:14] make 
make all-recursive 
Making all in include 
make[2]: Nothing to be done for `all'. 
Making all in src 
/bin/sh ../libtool --tag=CC --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -MT api.lo -MD -MP -MF .deps/api.Tpo -c -o api.lo api.c 
../libtool: line 787: X--tag=CC: command not found 
../libtool: line 820: libtool: ignoring unknown tag : command not found 
../libtool: line 787: X--mode=compile: command not found 
../libtool: line 953: *** Warning: inferring the mode of operation is deprecated.: command not found 
../libtool: line 954: *** Future versions of Libtool will require --mode=MODE be specified.: command not found 
../libtool: line 984: libtool: warning: cannot infer operation mode from `/usr/bin/gcc-4.2': No such file or directory 
../libtool: line 7011: libtool: you must specify a MODE: command not found 
../libtool: line 7012: Try `libtool --help' for more information.: command not found 
make[2]: *** [api.lo] Error 1 
make[1]: *** [all-recursive] Error 1 
make: *** [all] Error 2 

好像殼它們傳遞給libtool之前試圖執行參數libtool的命令?找不到這些命令,因此字符串command not found傳遞給libtool,然後輸出sh試圖執行的一堆錯誤輸出,當然,這樣做是不行的。這可能與X似乎被添加到--tag--mode選項有關嗎?這是我最好的猜測,無論如何,由於我對libtoolmake的理解有限。

我已經嘗試添加下列選項的基礎上,我已經看到了這樣類似的問題,但無濟於事:

  • --with-gcc=clang
  • --enable-shared

我也嘗試單獨安裝libyaml(沒有RVM),同時使用MacPorts和從源代碼編譯,但都沒有工作。奇怪的是,如果我在安裝Ruby之後將Psych安裝爲gem,那麼沒有問題(但我確實希望它使用Ruby進行編譯)。

+1

您是否嘗試過使用Homebrew安裝?它使大多數依賴包非常易於安裝https://github.com/mxcl/homebrew,然後運行'brew instal libyaml' – bruno077

+0

@ bruno077嗯......這很簡單。我也曾嘗試使用MacPorts進行安裝,但這並不奏效,所以我想弄明白爲什麼還要使用另一個軟件包管理器? Homebrew =魔法?無論如何,如果你想把這個作爲答案,我會選擇/ upvote它。謝謝! – tsherif

+0

Homebrew是魔術,我不知道爲什麼,但每當我遇到一些lib問題時,Homebrew似乎都有一個包可以解決它。我很高興你能解決你的問題! – bruno077

回答

2

您是否嘗試過使用Homebrew進行安裝?它使大多數依賴包非常易於安裝,然後運行brew install libyaml