➜ ~ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-e:77: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040677
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)"
The current contents of /usr/local are bin CODEOFCONDUCT.md etc git lib Library LICENSE.txt munki README.md sbin share .git .github .gitignore
➜ ~ brew install maven
zsh: command not found: brew
最佳答案
我在 macOS Big Sur (11.0.1) 上遇到了类似的问题。就我而言, Homebrew 程序保存在 /opt/homebrew/
中,而不是 /usr/local/...
中。
所以我添加了
导出 PATH=/opt/homebrew/bin:$PATH
到我的主目录中的.zshrc
文件,ZSH shell能够找到brew命令。
关于macos - 安装 Homebrew 后,我得到 `zsh: command not found: brew`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36657321/