I ran into a problem when I downloaded El Capitan from the App Store. It started downloading and I switched tasks to do other things in the meantime. When I checked back with the App Store, it said “An error has occurred” next to “Downloaded”.

I didn’t know what to do at this point so I Googled around a bit and found a solution. I need to look in my Applications folder for the install file. Double click it to run it and everything went fine from there.

After the installation, the /usr/local directory was owned by root. I changed the ownership to me but this didn’t fix the problem because later /usr/local/bin and /usr/local/share reverted back to being owned by root. I followed the instructions based on this El Capitan and Homebrew and it works now.

  1. Reboot machine in recovery mode (press ⌘R on reboot)
  2. Open up a terminal (Click on Utilities menu and choose Terminal)
  3. Type csrutil disable
  4. Reboot machine and log in as usual
  5. In the terminal type
  6. $ sudo chflags -R norestricted /usr/local
    $ sudo chown -R $(whoami):admin /usr/local
  7. Reboot back to recovery mode
  8. Type csrutil enable in terminal
  9. Reboot back to to OS X

If you want to look at the flags on a directory you can do ls -lO dirname.