0

I want to install neovim but I'm getting the following error: Permission denied @ dir_s_mkdir - /usr/local/share

How can I fix this?

CNNTT
  • 27
  • 1
  • 7

1 Answers1

1

Recommended solution:

$ sudo install -d -o $(whoami) -g admin /usr/local/share

A not-so-elegant solution to give permission:

$ sudo chown -R $(whoami) $(brew --prefix)/*
Gordon Bai
  • 483
  • 5
  • 5
  • thanks a lot! Could you recommend me some sources where I can read more about this kind of stuff, meaning I don't really understand some of the flags, just for a reference. – CNNTT Feb 28 '21 at 10:55
  • You could search SO for some similar questions, e.g. this one, it has some great info: https://stackoverflow.com/questions/47513024/how-to-fix-permissions-on-home-brew-on-macos-high-sierra – Gordon Bai Feb 28 '21 at 11:02