Boy does my Homebrew installation like to get messed up. Pretty much every time I do a big
brew update I have to repair everything. This is what I typically have to do:
cd /usr/local sudo chown -R USERNAME /usr/local/.git sudo chown -R USERNAME /usr/local sudo chown -RL mysql:mysql /usr/local/mysql/data git pull git reset --hard origin/master brew update
My permissions often end up completely out of whack, and I also get a bunch of garbage in the
/usr/local directory. This fixes the permissions and pulls the latest from homebrew and runs the update. Your mileage may vary.