1、安装brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2、卸载brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
3、它的用法:
brew update 更新brew
brew install 应用名 安装软件
brew cask install 应用名 下载安装软件
4、解决高版本macos上brew偶发性无法使用问题
网上大部分博客方法为:sudo chown -R `whoami` /usr/local
但是会报错: chown: /usr/local: Operation not permitted
解决策:
① 本人亲测
cd /usr/local
sudo chown -R <your-username>:<your-group-name> *
② 未实际测试
sudo chgrp -R admin /usr/local/Homebrew/
sudo chmod -R g+w /usr/local/Homebrew/
sudo chgrp -R admin /usr/local/var/homebrew/
sudo chmod -R g+w /usr/local/var/homebrew/
③ 卸载重装brew