// 将brew权限改为root
chown root:wheel /usr/local/bin/brew
// 用root权限操作urs文件夹
sudo brew install wget
error
- Error: Could not create /usr/local/Cellar
brew install wget
- Error: Cowardly refusing to
sudo brew install
sudo brew install wget
- Error: chown: /usr/local/bin/brew: Operation not permitted
chown root:wheel /usr/local/bin/brew
success
sudo chown root:wheel /usr/local/bin/brew
sudo brew install wget