I ran brew install postgresql:
brew services start postgresqlReceived
Error: Permission denied @ apply2files - /Users/$USER/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
chmod 755 ~/Library/LaunchAgents and
cp /usr/local/opt/postgresql/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/ (from https://coreyward.svbtle.com/fixing-homebrew-postgres-installation-on-macos-catalina)This gave me Error: Permission denied @ rb_sysopen - /Users/$USER/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
I'm not too familiar with Homebrew and am wondering how to resolve this. Thanks!
I'm running on a Macbook Air m1.
When I ran:
brew services start postgresql
I got the following error:
Error: Permission denied @ rb_sysopen - /Users/<username>/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Instead of doing what you posted I did the following:
sudo chown <username> /Users/<username>/Library/LaunchAgents/
And that made it work. I got the idea from this github thread: https://github.com/Homebrew/homebrew-services/issues/177#issuecomment-450432567
You can run these two commands, it is working for me.
% chmod 755 ~/Library/LaunchAgents
% cp /usr/local/opt/postgresql/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
To read more about what's going on, you can check below link : Source : https://coreyward.svbtle.com/fixing-homebrew-postgres-installation-on-macos-catalina