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
4

1 回答 1

2

不是每个人都保留 ruby​​ 的默认系统版本。许多人会重命名这个文件并使用 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

可以工作!

于 2012-09-13T05:51:32.147 回答