Mac High Sierra 中不能改变/usr/local的拥有者

sudo chown -R $(whoami):admin /usr/local

chown: /usr/local: Operation not permitted


google到一个办法

sudo chown -R $(whoami):admin $(brew --prefix)/*


但是仍然报错

Error: Failed to link all completions, docs and manpages:

  Permission denied @ dir_s_mkdir - /usr/local/etc

Error: Could not create /usr/local/Cellar

Check you have permission to write to /usr/local


最终自己手动在 /usr/local 下 mkdir 了需要创建的文件夹Cellar,然后


sudo chown -R $(whoami) /usr/local/Cellar


终于OK了。


你可能感兴趣的:(Mac High Sierra 中不能改变/usr/local的拥有者)