本文章来源于:文章1:寒光冷剑文章:https://blog.csdn.net/G_eorge/article/details/51378654
文章2:LBinin文章:https://blog.csdn.net/lbinin/article/details/70188163
在按照上述 文章1(https://blog.csdn.net/G_eorge/article/details/51378654) 安装Homebrew时遇到和文章描述不同的情况:
显示安装成功后,参考安装成功页面的提示在命令框输入“brew help”,结果为 command not found ,
也就是说,安装虽然成功了,但是仍然不能使用brew命令
在网上搜索一番后参考了文章2(https://blog.csdn.net/lbinin/article/details/70188163)配置了brew的环境变量,但是按照文章做了一番后输入“brew help”仍然提示“command not found”,这是怎么回事呢?已经使用让环境变量实时生效的命令“source .bash_profile”依然不行,楼主至今仍然不知道原因,但解决方法很简单:
将命令框关闭再重新打开,再次输入“brew help”问题已经解决:
虽然问题已经解决,但是楼主暂时还是不知道这是为什么,为什么能使环境变量实时生效的命令“
source .bash_profile”在这里没有发挥作用,有哪位大神知道欢迎留言