【问题标题】:How to change Homebrew's prefix?如何更改 Homebrew 的前缀?
【发布时间】:2021-02-02 11:10:21
【问题描述】:

我正在使用 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

提前致谢。

【问题讨论】:

  • 其中一个不是符号链接吗?
  • 不,我没有使用符号链接。两者都是安装在不同架构中的 brew。一个在 ARM 上,一个在 Rosetta 2 (x86) 下。
  • 所以我猜 /usr/local 是 Rosetta (amd64) 吗?这是自制软件的一项新开发,可以为 mac-arm 和 amd64 使用单独的 dir 结构...

标签: macos homebrew apple-m1


【解决方案1】:

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

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

要卸载 Homebrew,请运行 uninstall script from the HomeBrew/install repository.

【讨论】:

    猜你喜欢
    • 2014-07-20
    • 2018-11-15
    • 1970-01-01
    • 2020-11-28
    • 1970-01-01
    • 2011-12-25
    • 2021-01-25
    • 2018-12-26
    • 1970-01-01
    相关资源
    最近更新 更多