Mac - 无法安装Homebrew

Cri*_*ano 11 macos homebrew osx-mountain-lion

我尝试像这样安装Homebrew:

ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
Run Code Online (Sandbox Code Playgroud)

它没有正确安装所以我关闭终端并再次尝试.现在它显示以下消息:

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
Run Code Online (Sandbox Code Playgroud)

我试图这样做,但没有成功.将显示以下消息:

brew: command not found
Run Code Online (Sandbox Code Playgroud)

所以,问题是已经安装了Homebrew但实际上它没有安装.有什么建议如何解决这个问题?谢谢!

iii*_*iii 38

这似乎已经为我解决了这个问题

rm -rf /usr/local/Cellar /usr/local/.git
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Run Code Online (Sandbox Code Playgroud)

之后,我现在可以

brew doctor
Run Code Online (Sandbox Code Playgroud)

您还可以在以下使用页面中找到链接到的要点:

https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md

如果它可以解决您的问题,请投票给您答案.


Ele*_*ter 10

您使用的命令中包含的URL不正确.Ruby将转储HTML行,然后失败.请改用此命令:

ruby -e "$(curl -fsSkL raw.github.com/Homebrew/homebrew/go/install)"


小智 6

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Run Code Online (Sandbox Code Playgroud)

这是为我工作!


DMR*_*DMR 2

第一次安装时未正确安装时给出的消息是什么?brew 二进制文件是否存在于 /usr/local/bin 中?如果是这样,您可能只需将其添加到您的路径中,请参阅:安装 Homebrew 时出错 - 未找到 Brew 命令