2012-09-09 41 views
0

如何解決此路徑問題?我不能使用brew命令,我想我以前的符號鏈接錯誤的位置。自制路徑問題

Master:~ shaunstanislaus$ ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go) 
==> This script will install: 
/usr/local/bin/brew 
/usr/local/Library/... 
/usr/local/share/man/man1/brew.1 

Press enter to continue 
==> Downloading and Installing Homebrew... 
remote: Counting objects: 82368, done. 
remote: Compressing objects: 100% (39323/39323), done. 
remote: Total 82368 (delta 56782), reused 65301 (delta 42220) 
Receiving objects: 100% (82368/82368), 11.68 MiB | 1.59 MiB/s, done. 
Resolving deltas: 100% (56782/56782), done. 
From https://github.com/mxcl/homebrew 
* [new branch]  master  -> origin/master 
HEAD is now at 2ea1a0e smpeg: depends on gtk 
==> Installation successful! 
You should run `brew doctor' *before* you install anything. 
Now type: brew help 
Master:~ shaunstanislaus$ brew doctor 
-bash: /usr/local/bin/brew: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory 
Master:~ shaunstanislaus$ echo $PATH 
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/shaunstanislaus/Library/Application Support/GoodSync:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/Users/shaunstanislaus/.ec2/bin:/Users/shaunstanislaus/.rvm/bin 

/usr/local/bin/brew: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory 

回答

2

不是每個人都保持紅寶石默認的系統版本。許多人會重命名這個文件並使用MacPorts ruby​​,或者手工編譯它,在這種情況下它可能位於不同的位置。 我建議改變它,以便它會在不在默認位置的其他位置查找ruby可執行文件。

訪問http://linguisticlogic.wordpress.com/2010/11/27/homebrew-mac-osx-and-ruby/

只是做

sudo ln -s /opt/local/bin/ruby /usr/bin/ruby 

可以工作!