在安装了homebrew的前提下出现,-bash : brew: command not found
是因为环境变量的问题:
- 输入export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin
这行命令可以保证所有的变量暂时有效,相当于设置了一个暂时的环境变量 - vim ~/.bash_profile 修改配置文件:
添加:export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" 保存退出,然后source .bash_profile 运行配置使其生效
https://www.jianshu.com/p/bed12be0bff5