A postgres problem

Hello,
When I launch “gvm-check-setup” then it show me:

FIX: Run 'sudo runuser -u postgres -- /usr/share/gvm/create-postgresql-database'

And the above command show me:

$sudo runuser -u postgres -- /usr/share/gvm/create-postgresql-database
createuser: error: could not connect to database postgres: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
createdb: error: could not connect to database template1: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: error: could not connect to server: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: error: could not connect to server: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: error: could not connect to server: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

How can I fix it?

Thank you.

This info should already contain all needed info about your issue:

If you need further help with Kali / your PostgreSQL setup on Kali please ask for support at https://forums.kali.org/

1 Like