Installing git on macOS with Homebrew Error

529 Views Asked by At

I had already installed HomeBrew on macOS but when I try to install git from the command:

brew install git

The terminal pops up with this error:

Updating Homebrew...

Error: The following directories are not writable by your user:
/usr/local/share/zsh /usr/local/share/zsh/site-functions

You should change the ownership of these directories to your user.  
sudo chown -R $(whoami) /usr/local/share/zsh
/usr/local/share/zsh/site-functions

I don't really understand what the program is really trying me to say. Any help with be useful.

1

There are 1 best solutions below

0
On BEST ANSWER

It is saying run this command

sudo chown -R $(whoami) /usr/local/share/zsh /usr/local/share/zsh/site-functions