gpt4 book ai didi

macos - 安装 Homebrew 后,我得到 `zsh: command not found: brew`

转载 作者:行者123 更新时间:2023-12-02 05:30:54 26 4
gpt4 key购买 nike

➜  ~ /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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com