Homebrew ❤️ El Capitan

14 October 2015 on cli and mac.

Some developers have been issues getting set up with homebrew after upgrading to El Capitan. Thanks to a new feature called System Integrity Protection, users are no longer allowed to write to system directories such as /usr, /etc, /bin.

Obviously, Apple was smart enough to notice that hard-users (devs) would need some sort of access to a lower-level folder on the system to run binaries and root scripts, so they let /usr/local out of the lock down. That folder by default is owned by root:wheel but it can be changed, and that’s where homebrew comes in.

Running the following command should grant you permissions to write to that folder and therefore install apps using homebrew.

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

If that for some reason fails, try running:

sudo mkdir /usr/local && sudo chflags norestricted /usr/local && sudo chown -R $(whoami):admin /usr/local

This should allow you to install homebrew and start searching for command-line apps.