2011-10-18 113 views
2

1.9.2時,試圖用RVM安裝Ruby使錯誤通過RVM OSX 10.7.2獅4.2的XCode

/Users/craigspaeth/.rvm/scripts/functions/utility: line 152: date: command not found 
Installing yaml to /Users/craigspaeth/.rvm/usr 
/Users/craigspaeth/.rvm/scripts/functions/utility: line 152: date: command not found 
ERROR: Error running 'make install', please read /Users/craigspaeth/.rvm/log/ruby-1.9.2-p290/yaml/make.install.log 

安裝1.9.2這裏是YAML /配置,我發現了以下錯誤。日誌

[] make install 
Making install in include 
make[2]: Nothing to be done for `install-exec-am'. 
test -z "/Users/craigspaeth/.rvm/usr/include" || ../config/install-sh -c -d "/Users/craigspaeth/.rvm/usr/include" 
/usr/bin/install -c -m 644 yaml.h '/Users/craigspaeth/.rvm/usr/include/.' 
Making install in src 
test -z "/Users/craigspaeth/.rvm/usr/lib" || ../config/install-sh -c -d "/Users/craigspaeth/.rvm/usr/lib" 
/bin/sh ../libtool --mode=install /usr/bin/install -c libyaml.la '/Users/craigspaeth/.rvm/usr/lib' 
libtool: install: /usr/bin/install -c .libs/libyaml-0.2.dylib /Users/craigspaeth/.rvm/usr/lib/libyaml-0.2.dylib 
libtool: install: (cd /Users/craigspaeth/.rvm/usr/lib && { ln -s -f libyaml-0.2.dylib libyaml.dylib || { rm -f libyaml.dylib && ln -s libyaml-0.2.dylib libyaml.dylib; }; }) 
../libtool: line 941: ln: command not found 
../libtool: line 941: rm: command not found 
libtool: install: /usr/bin/install -c .libs/libyaml.lai /Users/craigspaeth/.rvm/usr/lib/libyaml.la 
libtool: install: /usr/bin/install -c .libs/libyaml.a /Users/craigspaeth/.rvm/usr/lib/libyaml.a 
libtool: install: chmod 644 /Users/craigspaeth/.rvm/usr/lib/libyaml.a 
../libtool: line 941: chmod: command not found 
make[2]: *** [install-libLTLIBRARIES] Error 127 
make[1]: *** [install-am] Error 2 
make: *** [install-recursive] Error 1 

我在OSX獅子10.7.2與XCode 4.2。我試過將export CC=/usr/bin/gcc-4.2添加到我的bash_profile中,但它沒有幫助。

有沒有其他人遇到過這個問題?我即將完全禿頭拉我的頭髮。

編輯:傻我我沒有安裝gcc獨立?無論哪種方式,我現在得到上面的新錯誤。

+1

這工作與我的紅寶石1.9.3 MAC獅子10.7.2的Xcode 4.2 [http://stackoverflow.com/questions/8032824 /傾斜安裝-紅寶石下獅與 - RVM-GCC-問題] [1] [1]:http://stackoverflow.com/questions/8032824/cant-install- ruby-under-lion-with-rvm-gcc-issues – aminhotob

+0

這對我有用紅寶石1.9.3 mac獅子10.7.2 xcode 4.2 [http://stackoverflow.com/questions/8032824/cant-install -ruby-下獅與 - RVM-GCC-問題] [1] [1]:http://stackoverflow.com/questions/8032824/cant-install-ruby-under-lion- with-rvm-gcc-issues – aminhotob

回答

1

此錯誤已被固定在1.9.2頭......所以才

rvm install 1.9.2-head && rvm use 1.9.2-head --default 

我發現1.9.3是不是有很多我還沒有使用的庫兼容。這適用於Xcode 4.2。

-1

不要使用Xcode 4.2。它目前在建造紅寶石和原生延伸寶石,以及Homebrew和MacPort版本方面存在問題。這是由於蘋果公司對LLVm的改變。這是一個編譯器問題,而不是RVM問題。請至多使用Xcode 4.1以及Apple爲4.1系列提供的任何補丁。

+0

我在哪裏可以找到xco de 4.1? – Craig

+0

不幸的是,應該仍然在AppStore中,否則你可能不得不爲它找到一個torrent。 – ddd

+3

'''rvm get head''' or '''rvmsudo rvm get head''' 如果您使用的是多用戶安裝。 然後閱讀'''rvm requirements'''來獲得URL – ddd

0

我剛剛第一次安裝rvm,它工作。它吐出了一個關於Ruby 1.9.2警告,所以我建造和安裝1.9.3,使用(我是10.7.2,和Xcode 4.2)

rvm install 1.9.3 && rvm use 1.9.3 --default 

工作的罰款。但是Heroku對於1.9.3的雪松並沒有支持(或者至少他們沒有聲稱),所以我真的想跑1.9.2。所以我試過了:

rvm install 1.9.2 && rvm use 1.9.2 --default 

而且它也起作用......所以我不確定在這裏發生了什麼'正確'。我將Xcode 4.2安裝在默認位置,但我也在'Developer4.1'中安裝了Xcode 4.1。我在重新命名4.1安裝後安裝了4.2。希望這可以幫助某人。

ruby-1.9.2-p290 - #extracting ruby-1.9.2-p290 to /Users/tandersen/.rvm/src/ruby-1.9.2-p290 
    ruby-1.9.2-p290 - #extracted to /Users/tandersen/.rvm/src/ruby-1.9.2-p290 
    Fetching yaml-0.1.4.tar.gz to /Users/tandersen/.rvm/archives 
    Extracting yaml-0.1.4.tar.gz to /Users/tandersen/.rvm/src 
    Configuring yaml in /Users/tandersen/.rvm/src/yaml-0.1.4. 
    Compiling yaml in /Users/tandersen/.rvm/src/yaml-0.1.4. 
    Installing yaml to /Users/tandersen/.rvm/usr 
    ruby-1.9.2-p290 - #configuring 
    ruby-1.9.2-p290 - #compiling 
    ruby-1.9.2-p290 - #installing 
    Removing old Rubygems files... 
    Installing rubygems-1.8.10 for ruby-1.9.2-p290 ... 
    Installation of rubygems completed successfully. 
    ruby-1.9.2-p290 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake). 
    ruby-1.9.2-p290 - #importing default gemsets (/Users/tandersen/.rvm/gemsets/) 
    Install of ruby-1.9.2-p290 - #complete 
    Using /Users/tandersen/.rvm/gems/ruby-1.9.2-p290 
    Snow-Pro:~ tandersen$ 

    Snow-Pro:~ tandersen$ irb 
    ruby-1.9.2-p290 :001 > x = 3 
    => 3 
    ruby-1.9.2-p290 :002 > x*x 
    => 9 
0

如果你正在做一個乾淨的安裝xcode 4.2它不會工作。對於那些表示他們正在使用4.2的人來說,我建議他們已經在4.1的頂部安裝了4.2,而蘋果文檔只安裝一次unix工具。因此,請確保您知道系統上已安裝的內容。你

年03月21

我已經安裝並測試了以下

  1. 下載和安裝的Xcode 4.3.2的Xcode
  2. 下載並安裝命令行工具下旬

    UPDATE 2012年3月

  3. 設置xcode路徑$ xcode-select -switch/Application/xcode。應用/內容/開發人員
  4. 安裝Homebrew,然後安裝git,autoconf,automake,libyaml, libksba,wget via Brew。
  5. 安裝RVM確保它是建立在你外殼
  6. RVM安裝Ruby-1.9.3-P125

有文章在那裏推薦這對Ruby> = 1.9.3和多數民衆贊成我的全部經過測試並正在使用。我沒有安裝和使用mysql2,sqlite和通常的可疑(GEM)他們都編譯並通過了我的一些基本測試

希望這會有所幫助。

2

使用全新安裝的Xcode 4.2,你可以通過RVM安裝Ruby 1.9.2,但它不受支持,並可能與一些本地的寶石引起的問題,使用此命令:

rvm install 1.9.2 -C --with-gcc=clang 

這是注意到RVM問題清單在這裏:

https://github.com/wayneeseguin/rvm/issues/610