Homebrew安装软件出现无写入权限报错的解决方案

系统版本
macOS 10.14及以上

情景
使用 brew install ** 指令

报错
The following directories are not writable by your user:
/usr/local/share/man/man8

You should change the ownership of these directories to your user.
sudo chown -R $(whoami) /usr/local/share/man/man8

And make sure that your user has write permission.
chmod u+w /usr/local/share/man/man8

解决方案
使用如下指令获取usr/local文件夹的写入权限

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

重新调用 brew install ** ,即可正常完成安装
————————————————
版权声明:本文为CSDN博主「CaesarWen」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/pkorochi/article/details/83510834

你可能感兴趣的:(Homebrew安装软件出现无写入权限报错的解决方案)