I just upgraded to El Capitan, and when I tried updating brew I got the following error:
$ 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 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
Before I proceed with the chown recommendation, given that El Capitan just came out, is that the right way to proceed here? Why is this step necessary, and what are any potential undesirable consequences of running this command?
In case it helps, I found two issues about El Capitan in brew: 40837 and 41665 but a solution to this problem wasn't immediately clear. What can I do to continue to use brew in El Capitan reliably?
/usr/local? – user3439894 Oct 03 '15 at 22:32sudo chown -Rgives me the willies. It doesn’t matter what the other parameters are. I have more than Homebrew in/usr/local, and it’s not an obviously-safe command. I confirmed via Time Machine that installing El Capitanchowned, exclusively,/usr/local, and not subdirectories. I was thus able to get away with doing a non-recursive reversion, i.e.sudo chown $(whoami):admin /usr/local. YMMV. – duozmo Jan 11 '16 at 05:02-Rinsudo chown -Ris really heavy handed. That's tantamount to Brew claiming domain over the entirety of/usr/local– HairOfTheDog Nov 22 '16 at 00:44