Fixing brew on new machines

Every once in a while, I spill coffee on my brand new MacBook Pro, or leave the charger at office over the weekend and need to work on a borrowed machine.

There are two major issues whenever something like this happens. The first, is backups, which got solved after I moved to a complex setup of iCloud and Dropbox to cover and update every byte that I ever type on a machine.

The second is that any time you move to a borrowed Mac, you see a bunch of stuff like this, the moment you try to install something via home brew.

Now, it’s hard to bitch about open source issues, given it’s an argument that I make on a regular basis - the reason it’s open is that if you see an issue, you fix it. The best answer to the above issue would have been that I went there and fixed this, but sadly no, I didn’t.

I did the next best thing, figured out what has solved my problem most of the times, and run that as soon as I borrow a machine. This is all I have ever needed to do:

sudo chown -R $(whoami) /usr/local/Homebrew/
sudo chown -R $(whoami) /usr/local/Cellar/
sudo chown -R $(whoami) /usr/local/Caskroom/

The undying tussle between brew and Mac OSX on which folders should have access to what folders, makes it clear that this problem isn’t going away soon. But if you are stuck in a similar situation, just go ahead and use this, and let me know if it doesn’t work for you because I’m sure there’s a situation like that coming up for me soon.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.