I am trying to install and run postgresql@14 on my Ventura 13.2.1 macbook. But, the service is always at error 256 or 512 status. I have tried every single solution in this post, but without any success. Here more details about it:
➜ ~ brew services list
Name Status User File
mongodb-community started adrien ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist postgresql@14 error 512 root ~/Library/LaunchAgents/[email protected] unbound none
➜ ~ tail -f /opt/homebrew/var/log/[email protected]
postgres: could not access the server configuration file "/opt/homebrew/var/postgresql@14/postgresql.conf": No such file or directory "root" execution of the PostgreSQL server is not permitted. The server must be started under an unprivileged user ID to prevent possible system security compromise. See the documentation for more information on how to properly start the server.
➜ ~ initdb -D /var/lib/postgres/data/
The files belonging to this database system will be owned by user "adrien". This user must also own the server process.
The database cluster will be initialized with locale "fr_FR.UTF-8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "french".
Data page checksums are disabled.
creating directory /var/lib/postgres/data ... initdb: error: could not create directory "/var/lib/postgres": Permission denied