报错
“-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