Homebrew安装失败,但现在无法卸载

时间:2015-09-30 05:13:06

标签: homebrew

我使用以下命令安装Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

然后将其作为错误返回:

It appears Homebrew is already installed. If your intent is to reinstall you should do the following before running this installer again:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

当我在终端中运行该命令时,我只是得到了#34;无法找到Homebrew!"

2 个答案:

答案 0 :(得分:5)

我在mac OS上遇到了同样的问题。这里有很多答案建议我删除/usr/local/.git,但这不存在。我的解决方案如下:

我导航到:

/usr/local/Homebrew/bin

跑了:

./brew doctor

它警告我找不到Homebrews bin并建议我将它添加到我的.bash_profile中:

echo 'export PATH="/usr/local/Homebrew/bin:$PATH"' >> ~/.bash_profile

在此之后我开始了一个新的会议,我又回来了

答案 1 :(得分:3)

我遇到同样的情况并且这样做:

sudo rm -rf /usr/local/.git
chown <your_username> /usr/local

之后,我可以安装Homebrew。

相关问题