I'm really expected to recursively change ownership of my entire usr/local
directory just because Homebrew told me to? A directory shared by all sorts of other applications and services? Ridiculous
Homebrew needs to work with the systems it is installing itself on. If there are permission issues then it needs to suggest sudo commands to the user that cover its specific requirements. Better yet provide a script for users to run under sudo to pre-create the dirs set permissions prior to install.
The closest I could come up with is the following. This make use of the users default group setting so other users can install homebrew utilities as well. Replace $GID if you want to use a different group, admin is a common one.
for name in Cellar Cask Homebrew Frameworks; do [ ! -d $name ] && sudo install -d -g $GID -m 0775 /usr/local/$name; done
Thank you!
Was getting
erma4inapower@MacBook-Pro-Dmitrij ~ brew services start php
Error: Permission denied @ rb_sysopen - /Users/erma4inapower/Library/LaunchAgents/homebrew.mxcl.php.plist
Ended up:
sudo chown -R $(whoami) /Users/erma4inapower/Library/LaunchAgents/
🙏🙏🙏
thanks! really helpful
life saver!
tysm🙏🏽
thank you!
thank you !!! what exactly did I just do ??? 🤔🤔🤔 you saved my lifeee
thank you 😁
This just save my bacon... Thanks a lot...
thank you!
It worked! Thank you!
Youre a genius my friend, thank you!
Thank you!
my solution with link: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
and command: sudo chown -R "$(whoami)":admin /usr/local
it ":admin" for sum in user
MacOS BigSur 11.4
Thanks~
Thank you ser!
great, you save my life
In my case I had to setup a new local user on my machine and to remove the old one.
Then the folder ( defined by brew --prefix ) looses its owner.
With this the owner is set to the new local user and - it works!
In my case, had this problem as I created a new user for development and installed brew in my original Mac OS Monterey user account. The mentioned solution solved my problem. Thanks !
Nice~ Greate job!
Thanks! Worked for me (macOS Ventura 13.3.1)
Hi ! how can i fix this
/Users/emvlp/.zprofile:24: permission denied: /opt/homebrew/bin/brew
Could someone tell me the steps?
Thank you so much !
Thanks @erma4ina
and command: sudo chown -R "$(whoami)":admin /usr/local
it ":admin" for sum in user
Thanks, this worked for me!
(macOS Ventura 13.9, Intel Mac)
Worked for me on Intel Mac with macOS Ventura 13.5. Thank you :)
wooooow <3