将 PATH 添加到 ~/.zshrc 时出现问题

将 PATH 添加到 ~/.zshrc 时出现问题

我在 zsh 上添加路径变量时遇到问题。

这是产生的警告:

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

答案1

您可以安全地遵循警告的建议并运行:

  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

然后警告就会消失。

相关内容