brew: command not found 修复 mac

brew: command not found 修复 mac

之前就安装过brew,然后今天突然要用结果说

1
-bash: brew: command not found

然后在桌面版的Cakebrew里面也显示brew未安装…那我就重新安一下吧
安装很顺利不过有个警告

1
2
Warning: /usr/local/bin is not in your PATH.
==> Installation successful!

看了一下我的/usr/local/bin目录没问题啊…里面也有brew
然后用终端启动依然报错,才意识到有点问题。

1
-bash: brew: command not found

解决办法:更改bash配置文件(主目录中的.bashrc或.profile),并添加以下行

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

感谢:stackoverflow

  标签:  bash, brew, 终端

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×