1

I have installed Homebrew and Cask to my machine, and it has worked for some things. But I sometimes get an error saying

==> ln: /usr/local/bin/<Cask name>: Permission denied
Error: Command failed to execute!

I know why this is caused, and how to fix it using sudo, but is there a way to do it even temporally without sudo?

P.S. How it is done with sudo:

sudo chown -R $(whoami) /usr/local/bin 
0

You'll have to run the command itself as the super user:

sudo brew install FORMULA

you can temporarily grant yourself super user priveleges by entering:

su USERNAME

then you can just simply enter: brew install FORMULA

Either way, you'll have to enter your password, but with the second method, you'll only have to enter it once, as you will remain a super user for the remainder of the terminal session.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.