Impulso
Impulso

Reputation: 27

/usr/local has correct permissions, but brew update still says it is not writable

Here are the permissions to my /usr/local directory: drwxr-xr-x.

I did sudo chown -R $user /usr/local, then did brew update again. It didn't work. I tried quitting terminal and opening a new session and trying again and I got the same thing. When I try brew doctor or brew update, it tells me that this directory is not writable. What do I do? What else do I need to be checking?

Upvotes: 0

Views: 304

Answers (2)

胡童心
胡童心

Reputation: 201

When I try to brew update Tip me Error: / usr/local must be writable!

  1. sudo chgrp -R admin /usr/local
  2. sudo chmod -R g+w /usr/local

The above method solves my problem

Upvotes: 1

bfontaine
bfontaine

Reputation: 19810

You need to run sudo chown -R $(whoami):admin /usr/local. Also note that in the command you ran $user should be capitalized: $USER.

Upvotes: 0

Related Questions