GVM Install & setting on kali linux 2020.3

I am trying GVM GVM Install & setting on kali linux 2020.3.
Then I was able to install by sudo apt install -y gvm without any error

But sudo gvm-setup does not work fine. and got below error
ERROR: The default postgresql version is not 13 required by libgvmd
Error: Use pg_upgradecluster to update your postgres cluster

Could you please give me some advices

It looks that the message is already telling you what to do:

More info on this command can be found quite easily on the internet like below. If you need further support with this please contact the Kali community at https://forums.kali.org/

Thank you for your supportt!!

According to https://www.postgresql.org/docs/11/pgupgrade.html which you shared,
I understood I should change from current version to 13.

So I tried “which postgresql” to know the path of bindir.
But no result(empty).

Also tried “dpkg -l | grep postgresql”, then looks like version 13 has already installed like attached file.

I am bit confused due to first time to use Linux and it may stupid question.sorry.

But I am appreciated if you give me some more advice

1 Like

I have the same issue. pg_lsclusteres returns:
sudo pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
12 main 5432 online postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
13 main 5433 online postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log

It is not possible to upgrade ‘main’ cluster to 13 since it already exists.

The error and fix provided in Step 5 of gvm-check-setup is either vague, incomplete, or incorrect:

Step 5: Checking Postgresql DB and user …
ERROR: The default postgresql version is not the one used for gvmd compilation: (12, need 13).
FIX: Please use pg_upgradecluster to upgrade your postgresql installation

It would be great to have a ‘FIX’ message that better described the actual fix.

1 Like

@alpha23 Please note that gvm-setup is a 3rdparty script not provided / maintained by Greenbone. If you have suggestions for improvements of this scripts please raise an issue for the Kail packaging team at https://bugs.kali.org.

For general support / help with the upgrade of PostgreSQL the following community forums can be used:

To me clear because I’ve seen some complains stating we aren’t helpful in this forum and are not willing to fix such issues. This has nothing to do with our software!

This is a distribution setup and packaging issue. We the developers of GVM/OpenVAS have no (really no) influence at this. It is not our daily business nor does it touch our daily business in any kind. We are always willing to help even with unrelated stuff like PostgeSQL setup issues but please stop making false claims about our software.

Kali is shipping some extra stuff like the gvm-setup or gvm-check-setup tools. These tools are not maintained at Greenbone nor do we contribute to these tools!

1 Like

The solution for the issue I raised is found here, https://www.reddit.com/r/Kalilinux/comments/jfitq5/openvas_install_errors/, and relates to OpenVas looking for postgresql on port 5432. Specifically,

"The problem is actually being caused by a port mapping issue. By default, Kali comes with postgres 12, but OpenVAS installs version 13. Postgres assigns a higher port (5433, in this case) for additional versions on the system. But OpenVAS is still looking for 5432.

A quick solution is to edit the " port = " lines in the




configuration files. Give the v. 13 port the value of 5432, and give the v. 12 port any other value. Then restart postgres using:

sudo systemctl restart postgresql"


Exactly the one I was referring to. THIS IS NOTHING WE THE DEVELOPERS CAN FIX. The default port of PostgreSQL is 5432. If a second version is installed, the Distribution(!) chooses to run the PostgreSQL cluster on the next port. Ubuntu and Debian have a warning about updating to a never Postgres version exactly about this problem during the package installation.

You are stating OpenVAS is installing Postgres 13 and therefore we are causing the problem. This is wrong. First of all openvas is only the scanner nowadays and the component using Postgres is called gvmd. Second when building gvmd it has to be build against a specific Postgres version. Which version is taken during the build process of gvmd is completely transparent for us (only the version must be >= 9.6). Our software doesn’t care about Postgres 12 or 13 at all! THIS IS A PACKAGING/SETUP ISSUE. It would be possible to build against both Postgres versions and support both versions in Kali at the same time. Not that easy but possible. So please be patient and don’t issue false claims. This is an problem caused by the distribution not on our side.

And just by the way by default gvmd even doesn’t use the IP connection and therefore the port. We use Unix Domain Sockets to connect to PostgreSQL.


Well said, i think there is nothing more to add here, closing this OFF TOPIC discussion here.

For the records, some one raised an issue for the Kali package maintainer about that topic here:


Please follow up in that issue if you have further comments / suggestions on this topic.

Firstly after installing Kali-Linux-2020-3 update & upgrade

You will get this error when you attempt to install gvm

Error: the default postgresql version is not 13 required by libgvmd Use pg_upgradecluster to upgrade your Postgres cluster Which then errors out “already on version 12”

FIX: list your clusters


and drop all clusters besides 13 cluster. eg:

sudo pg_dropcluster 12 main –stop

GVM versions

gsad: (‘gsad --version’)
gvmd: (‘gvmd --version’)
openvas-scanner: (‘openvas --version’, in older GVM versions < 11: ‘openvassd --version’)


Kali Linux 2020-3:
Kernel:5.9 (‘uname -a’)
Installation method / source:


Thanks for posting this info. Wile it might solve the initial problem i still would suggest to get in contact with the Kali package maintainer at https://bugs.kali.org so that they can improve e.g. the message or the upgrading of the PostgreSQL cluster / version so that this GVM unrelated problem doesn’t affect your work with GVM.

1 Like