Installing OpenVAS on Kali / Debian problem with PostgreSQL version

gvm-setup will look for PostgreSQL on port 5432. If you have more than one version of PostgreSQL installed, they will be assigned incremental port numbers starting at 5432. To check for other versions of PostgreSQL, you can look in the /etc/postgresql/ directory. You may see multiple directories, corresponding to the PostgreSQL versions you have installed.

You should go into each version and edit the postgresql.conf file to change the port number of PostgreSQL 13 to 5432, and assign other port numbers to the other versions. So if you had PostgreSQL 12 and 13 installed:

Edit the PostgreSQL 12 config file

$ nano /etc/postgresql/12/main/postgresql.conf

find the line port = 5432 and change to:

port = 5433

Edit the PostgreSQL 13 config file

$ nano /etc/postgresql/13/main/postgresql.conf

find the line port = 5433 and change to:

port = 5432

Finally restart PostgreSQL:

systemctl restart postgres

and then run gvm-setup again

gvm-setup