Fixing Homebrew

Multithreaded JavaScript has been published with O'Reilly!

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.

Thomas Hunter II Avatar

Thomas has contributed to dozens of enterprise Node.js services and has worked for a company dedicated to securing Node.js. He has spoken at several conferences on Node.js and JavaScript and is an O'Reilly published author.