1

I'm using OS Catalina atm. I am trying to install Node and Homebrew but I can't seem to install anything because it keeps on saying I don't have permission in /usr/local/

Installing homebrew gives me

chmod: Unable to change file mode on /usr/local/share/zsh: Operation not permitted
chmod: Unable to change file mode on /usr/local/share/zsh/site-functions: Operation not permitted
Failed during: /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions

I tried changing permissions via sudo chown -R $(whoami) /usr/local/* but I keep on getting Operation not permitted

Some people suggested to reinstall homebrew but I can't do it because of the permissions so I am just running in circles. I can't install anything too like Virtual env or any other apps.

Please help!!!

I also tried reinstall my mac os but still no luck :(

  • 1
    Does /usr/local exist and what is in it. Try ls -lR /usr/local You possibly have a mixed up system after changes/ – mmmmmm Oct 17 '20 at 15:37
  • yes it exists. I tried running the command and the owners are mixed up either "myusername" or "postgres" – showstappa Oct 17 '20 at 22:29
  • You have installed other programs in /usr/local/bin (including postgres) You can really only use Homebrew if you have nothing else installed in /usr/local/bin You need to uninstall the other programs before using Homebrew – mmmmmm Oct 17 '20 at 22:44
  • so in this case it's postgresql right? – showstappa Oct 17 '20 at 22:49
  • At least try that first – mmmmmm Oct 17 '20 at 22:58

You must log in to answer this question.

Browse other questions tagged .