cccicl
cccicl
发布于 2周前

Mac 下使用brew install 报错: Error: Cowardly refusing to `sudo brew install'

// 将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
Mac