今天使用HomeBrew安装Composer
执行brew update时出现如下错误:
DF-macbook:Homebrew DengFei$ brew update
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 or running Cocktail cleanup/optimizations
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
原因:新版OS X EI Capitan 出于安全原因修改了部分系统目录的权限
解决方案:安装提示在终端执行 sudo chown -R $(whoami):admin /usr/local 即可,之后 brew update 可以正常执行