首页 > 解决方案 > 如何更改 Homebrew 的前缀?

问题描述

我正在使用 MACOS M1,并开始在 ARM 下安装 brew。然后前几天,我在x86下安装了一些公式。

当我运行命令时 brew doctor ,我收到了这条消息

Some of Homebrew's bottles (binary packages) can only be used with the default
prefix (/usr/local).
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
unsupported configuration.

如何将前缀更改为 /usr/local/?

当我跑步时,which -a brew我得到了这个结果

/opt/homebrew/bin/brew
/usr/local/bin/brew

提前致谢。

标签: macoshomebrewapple-m1

解决方案


我遇到了同样的问题,因为我没有从终端上的本地路径安装自制软件。

我刚刚卸载了自制软件,再次安装(这次从本地路径),现在很好。

要卸载 Homebrew,请从 HomeBrew/install 存储库运行卸载脚本。


推荐阅读