The Invincible A personal archive of software, founder life, travel, and the occasional detour.
Randoms

Brew Permission Denied on Mac OS X

This is a common error that might occure while you try to install a brew package or when you try to do a brew link which could say Error: Permission denied

It’s too bad that unless you properly look on the log it outputs on the console, you won’t notice that the brew link has actually failed.

Anyway, what happens most of the time is, When we run an application installation with super user permissions, sometimes it actually modifies the permissions on /usr/local which will they be a problem for a application that’s not running with sudo permissions.

Luckily there’s a easy way to fix this, just run the below commands on terminal and brew should start working properly.

sudo chown -R "$USER":admin /usr/local

Also you might have to run this too in some cases

sudo chown -R "$USER":admin /Library/Caches/Homebrew

Related

More posts like this

Not Using AI Is a Choice, No more excuses

Frontier AI companies like OpenAI and Anthropic are competing hard, while open source models are catching up fast. This competition is driving costs down. The price per 1M tokens keeps dropping, which means you can do a lot more for a lot less. So the old excuse of 'I don't have the budget to use AI in my business' is quickly disappearing.

Read more
Day 5 of 31: Connections and Caffeine

The first Monday of the new year always feels like a reset button. For our service company, yesterday marked the official restart, and as expected, it was a busy one. The day was filled with catch-ups, follow-ups, and lots of reconnecting with clients who had patiently waited for us to get back into full swing.

Read more
Day 4 of 31: When the Day Slips Off Track

Some Sundays move at their own slow pace, and yesterday was one of them. I went into the weekend feeling excited to refactor a piece of code that’s been bothering me for weeks. But by Sunday evening, the work was still unfinished and instead of accepting that, I spent way too much time complaining to

Read more