2011-09-26 101 views
0

我在OS Lion 10.7.1上,從App Store安裝了最新的XCode。我已經安裝了git 1.7.4 dmg安裝rvm時的grep錯誤

我正在嘗試安裝rvm。我從他們的主頁上使用這個命令

bash < <(curl -sk https://rvm.beginrescueend.com/install/rvm) 

我得到了一些grep錯誤,如下所示。什麼地方出了錯?

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory 
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory 
Cloning into rvm... 
remote: Counting objects: 5542, done. 
remote: Compressing objects: 100% (2699/2699), done. 
remote: Total 5542 (delta 3620), reused 3898 (delta 2115) 
Receiving objects: 100% (5542/5542), 1.87 MiB | 411 KiB/s, done. 
Resolving deltas: 100% (3620/3620), done. 

    RVM: Shell scripts enabling management of multiple ruby environments. 
    RTFM: 
    HELP: 

Installing RVM to /Users/kl/.rvm/grep: ^hooks/[[:alpha:]]+_[[:alpha:]]+$: No such file or directory 
**grep: ^hooks/[[:alpha:]]+_[[:alpha:]]+$: No such file or directory 
grep: ^hooks/[[:alpha:]]+_[[:alpha:]]+$: No such file or directory 
grep: ^_: No such file or directory** 

Correct permissions for base binaries in /Users/kl/.rvm/bin... 
Copying manpages into place. 

    Notes for Darwin (Mac OS X) 
    For Snow Leopard be sure to have Xcode Tools Version 3.2.1 (1613) or later 
    You should download the latest Xcode tools from developer.apple.com. 
     (This is since the dvd install for Snow Leopard contained bugs). 

If you intend on installing MacRuby you must install LLVM first. 
If you intend on installing JRuby you must install the JDK. 
If you intend on installing IronRuby you must install Mono 
    (version 2.6 or greater is recommended). 

To use an RVM installed Ruby as default instead of the system ruby: 
rvm install 1.8.7 # installs patch 352: closest supported version 
rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system # migrate your gems 
rvm --default 1.8.7 


NOTE: 
As of 1.8.0 RVM once again loads .rvmrc files, by default, after asking your 
permission to trust it of course. If you do not wish to be enabled, simply set: 
    export rvm_project_rvmrc=0 
Within either your /etc/rvmrc or $HOME/.rvmrc file. This will turn off the 
cd/pushd hooks when sourcing the rvm() function into your shell. 


Example: echo 'export rvm_project_rvmrc=0' >> $HOME/.rvmrc; 
(Then close the current shell and open a new one.) 


Installation of RVM to /Users/kl/.rvm/ is complete. 
+0

你實際上是使用curl下載一個字符串和管道直接把字符串轉換成bash嗎?把這稱爲一個巨大的安全漏洞是輕描淡寫的。 –

+0

我剛從官方rvm網站複製並粘貼該命令 – thetrystero

回答

3

神聖的煙。這讓我把頭髮拉出來。安裝就像一個魅力 - 「顏色=自動」

中的.bashrc

出口GREP_OPTIONS =刪除的那一行。

+0

謝謝,那是修復! (註釋掉所有GREP_OPTIONS) – Renaud

+0

還幫助Ubuntu 12.04 – gertas