我使用带有 ARM 的 Mac,由于我想与多个用户一起使用 Homebrew,因此我创建了一个名为 Homebrew 的单独帐户,专门用于管理它。我按照此处的说明进行操作 - https://kuvalkin.com/blog/homebrew-installation-on-multi-user-system/
在我的其他帐户上,我使用 brew 并将这些行添加到我的.zshrc
# Set PATH, MANPATH, etc., for Homebrew.
eval "$(/opt/homebrew/bin/brew shellenv)"
alias brew="sudo -H -i -u Homebrew brew"
到目前为止,一切运行良好,除了每当我打电话给医生时 brew 都会发出令人讨厌的警告:
Warning: No Cask quarantine support available: unknown reason.
Warning: /usr/bin occurs before /opt/homebrew/bin in your PATH.
This means that system-provided programs will be used instead of those
provided by Homebrew. Consider setting your PATH so that
/opt/homebrew/bin occurs before /usr/bin. Here is a one-liner:
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc
The following tools exist at both paths:
...
然而,当检查我PATH
和 Homebrew 用户时,与警告相反,我获得了一个表现良好的 PATH。
/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/TeX/texbin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/username1/.scripts
调用sudo -H -i -u Homebrew echo $PATH
返回相同的 PATH。调用程序按预期工作 - 与警告所说的相反,自制版本优先。
此错误从何而来?此警告可以消除吗?