小陆同学

python 中文名:蟒蛇,设计者:Guido van Rossum

导航

mac--“-bash: brew: command not found”,怎么解决?

报错

“-bash: brew: command not found”

执行下面命令,安装HomeBrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

此时报错:

Error: Failure while executing: git clone https://github.com/Homebrew/homebrew-core /usr/local/Library/Taps/homebrew/homebrew-core --config core.autocrlf=false --depth=1 -q
Error: Failure while executing: /usr/local/bin/brew tap homebrew/core -q

 

依次执行下面两行命令即可成功解决

1、sudo chown -R apple:staff *

2、brew doctor

命令执行完之后HomeBrew也就安装好了

 

好了,小伙伴们,可以开始你们的操作啦

brew install xxx           安装xxx

brew uninstall xxx       卸载xxx

brew update  xxx         更新xxx

brew doctor                 修复brew

 

posted on 2019-11-19 21:54  小陆同学  阅读(11994)  评论(0编辑  收藏  举报