使用如下命令:

sudo vim .bash_profile

然后输入以下代码:

export PATH=/usr/local/bin:$PATH

再使用以下命令使配置生效:

source .bash_profile

这样就可以使用brew命令了

相关文章: