安装自制软件并使 PATH 正确(永久)

Installing homebrew and getting the PATH correct (permanently)

我已经在我的 MacOS 上安装了 Homebrew,我一直在学习一些在线教程,但它不是很有效。

我经常收到的错误消息是 -bash: brew: command not found

我怀疑这是因为我的 PATH 不正确。我试过 export PATH=/usr/local/bin:$PATH 好像暂时还可以,但是过了一会,好像又出问题了。如何设置我的 PATH 以使其正确并保持固定?

你能在终端上输入这个吗?

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

重新安装应该修复 PATH。

which brew
/usr/local/bin/brew