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
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/
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.
@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!
"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
/etc/postgresql/12/main/postgresql.conf
and
/etc/postgresql/13/main/postgresql.conf
configuration files. Give the v. 13 port the value of 5432, and give the v. 12 port any other value. Then restart postgres using:
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.
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â
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.