我使用以下命令来安装 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)"
当我在终端中运行该命令时,我只是得到“无法找到 Homebrew!”
最佳答案
我在 mac 操作系统上遇到了同样的问题。这里的很多答案建议我删除/usr/local/.git 但它不存在。我的解决方案如下:
我导航到:
/usr/local/Homebrew/bin
然后跑了:
./brew doctor
它警告我找不到 Homebrews bin,并建议我将其添加到我的 .bash_profile 中,如下所示:
echo 'export PATH="/usr/local/Homebrew/bin:$PATH"' >> ~/.bash_profile
在此之后,我开始了一个新的 session ,然后我又回来了
关于Homebrew 安装失败,但现在无法卸载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32858262/