解決mac安裝homebrew後報錯-bash: brew: command not found

解決mac安裝homebrew後報錯-bash: brew: command not found

 
 
參照官網上很簡單的一句安裝命令,
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安裝完畢後,發現使用brew命令,卻老是提示:-bash: brew: command not found
/usr/local/bin不在PATH中
找到解決方式。其實解決這個問題真的很簡單。以下:
sudo vim .bash_profile
添加:
PATH=「.;$PATH:/usr/local/bin」
保存,source .bash_profile使配置修改生效。
從新啓動終端  再次使用brew 命令就ok了。
相關文章
相關標籤/搜索