在 ~/.bash_profile中配置环境变量, 可是每次重启后配置的不生效,需要重新执行source ~/.bash_profile
~/.bash_profile
source ~/.bash_profile
解决办法:在~/.zshrc文件最后增加一行:source ~/.bash_profile
~/.zshrc
mac每次开机后都要执行一遍source ~/.bash_profile
原文:https://www.cnblogs.com/-cunyu/p/14792329.html