OS X 某个版本后,执行brew update会遇到一些问题,原因应该是 /usr/local 目录的所属变成了admin,改为自己即可。

1
2
3
4
5
6
7
8
9
MacBook-Pro:~ fang$ brew update && brew upgrade
Error: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.

You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami):admin /usr/local

执行命令

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