安装Homebrew时出错

时间:2013-10-23 03:44:01

标签: macos osx-mountain-lion homebrew

我正在尝试使用主页上提到的命令在我的系统上安装Homebrew

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

但它给了我以下错误 -

-e:67: warning: Insecure world writable dir /usr/local in PATH, mode 040777
-e:96: warning: Insecure world writable dir /usr/local in PATH, mode 040777
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup

如果我尝试进行清理,则表示无法找到brew命令。我在这里一无所知,如果我在机器上安装了它,为什么我不能运行任何brew命令。

2 个答案:

答案 0 :(得分:2)

运行:

xcode-select --install
rm -rf /usr/local/Cellar /usr/local/.git
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

答案 1 :(得分:0)

听起来如果你要做ls -al /usr,你会发现本地目录是drwxrwxrwx ...你试过chmod 775 /usr/local(可能需要也可能不需要sudo /usr/local/bin/brew 1}} prepended)。

另外,brew是否安装在{{1}}?或者在其他地方?