After installing OpenVAS on Kali linux, ran gvm-setup
command to setup GVM as per instructions: https://linuxhint.com/install-openvas-kali-linux/
However, the following error ocurred:
ERROR: The default postgresql version is not 13 required by libgvmd
Error: Use pg_upgradecluster to update your postgres cluster
So, I checked the version of PostgreSQL installed by:
$ su postgres
$ psql --version
psql (PostgreSQL) 13.2 (Debian 13.2-1)
The version was 13.
How can I complete the gvm-setup
?
2
Answers
gvm-setup
will look for PostgreSQL onport 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
find the line
port = 5432
and change to:Edit the PostgreSQL 13 config file
find the line
port = 5433
and change to:Finally restart PostgreSQL:
and then run gvm-setup again
The error message tells you, that you should upgrade your postgres cluster. There could already be a higher version of postgres cluster created in your system, which you can examine with the following command:
However, this auto generated cluster might not always function as intended (e.g. it operates on different from default port). Thus, it’s best to perform manual cluster upgrade (you can omit step 1 if you don’t have any auto generated cluster). Assuming that you want to upgrade from version 13 to 14:
delete automatically generated cluster version 14 (use
--stop
if service status is notdown
):migrate cluster version 13 to version 14:
optionally, you can drop the old cluster:
That’s it! The new cluster will listen on the port, that were previously used by the old cluster. It might be needed to start or enable postgres service in systemd in order to use PostgreSQL in other applications.