MacOS – I placed Neovim in usr/local/bin but getting permission denied

catalinacommand linemacospermissionvi

I'm not sure where to place the Neovim folder (after extracting it). Is the location usr/local/bin correct?

I get the following

zsh: permission denied: nvim

Best Answer

The location of an executable is much less important for it to be run from Terminal than its permissions.

Check them by running

ls -la /usr/local/bin/nvim

I'm not sure where to place the Neovim folder

You can place it anywhere you want as long as the shell can find it. Shell finds items using a variable named PATH.

Is the location [/]usr/local/bin correct?

It is correct only if this location is in PATH. Check it by running echo $PATH in your terminal. I personally like ~/Applications. If it is not in PATH: Open ~/.bash_profile/ ~/.zshenv in your text editor and add the following line to it

 PATH="/usr/local/bin":"$PATH"

zsh: permission denied: nvim

You have two choices here:

  • Use Homebrew to install it and no longer worry about putting files in lib or share or bin folder.

  • Run

    chmod u+x /usr/local/bin/nvim