How to fix homebrew permissions?

Posted by Longniao's Blog on October 17, 2016

在用Homebrew安装Kong的时候,报没有权限

Error: Your user does not have write permissions in /usr/local
-- you may want to run as a privileged user or use your local tree with --local.

解决方法:

修改安装目录的权限

sudo chown -R "$USER":admin /usr/local

以及

sudo chown -R "$USER":admin /Library/Caches/Homebrew

来源:gitHub’s homebrew issue tracker