brew update – Error: /usr/local must be writable!

Logo for Homebrew
0 0 vote
Article Rating

[UPDATE – View updated solution at the bottom of the post.]

So, you wanted to update homebrew with the command

brew update

but received a similar error below:

Error: /usr/local must be writable!

Simple fix is to run

sudo chown -R $(whoami) /usr/local

Your problem should now be fixed. If not, you might have ran into this issue that i’ve come across, too:

Error: update-report should not be called directly!

I fixed this by running both these commands

brew upgrade

then

brew update

Ta da! No more errors! Hopefully.

Happy brewing. Cheers, y’all.

UPDATE (2018.03.27):

A commenter pointed out an issue they were having, and after i did some digging, it seems that if you’re running the latest Mac OS High Sierra, you can no longer do the commands i wrote about above. You’ll have to use the tweaked command below:

sudo chown -R $(whoami) $(brew --prefix)/*

I found the updated solution here. Thank you to ilovezfs.

There are some other comments below it that may apply to your development environment. Hope this helps!
Cheers and peace.

0 0 vote
Article Rating

If you found this post useful ...

Buy Me a Coffee logo
Wondering why you keep seeing lower-cased 'i' in my posts? Read -> Why ‘i’ is not capitalized
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

6 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Michelle
Michelle
September 13, 2019 6:08 pm

It’s still not working on Mojave. I have tried everything. And yes I have tried sudo chown -R $(whoami) $(brew –prefix)/* nothing is working I still can’t make local writable and i cant update brew ……

maria
maria
March 25, 2018 12:53 pm

hi! while trying to fix this error i’m getting this other error: chown: /usr/local: Operation not permitted . Any other things I can try?

weienw
October 31, 2017 7:18 pm

Thanks a bunch, macariojames! This helped me out perfectly. :]

6
0
Would love your thoughts, please comment.x
()
x