Cannot install openvas in kali due to pg-gvm extension error

I encountered the error about pg-gvm extension after i run gvm-setup in kali linux as follow:

*] Creating extension pg-gvm
ERROR: extension “pg-gvm” is not available
DETAIL: Could not open extension control file “/usr/share/postgresql/16/extension/pg-gvm.control”: No such file or directory.
HINT: The extension must first be installed on the system where PostgreSQL is running.

I already attempt to create pg-gvm extension from postgresql command but it give the same error output as stated above. Can i know what is the alternate way to install pg-gvm extension?

FYI i already run apt update and update everything to the latest version in kali

1 Like

Hi jonathaninori, welcome to the Greenbone forum,

It seems that the Kali native GVM installation packages have started using PostgreSQL 16 instead of PostgreSQL 15. However, I guess that Greenbone’s postgres extensions are not tested against PostgreSQL 16. You can report the bug to Kali linux here: My View - Kali Linux Bug Tracker

In the meantime, you can fix by modifying the file /usr/share/gvmd/postgresql-version and change 16.0 to 15.0. Then gvm-setup should work properly for you.

1 Like

Hi, this solution does not work for me. Installing OpenVAS on Kali 2023.3 is a pain at the moment. Tried different tips on postgresql but did not get it working.


Thanks for your help. It work. I change the openvas config to use postgresql 15 instead of 16 and now gvm-setup can work perfectly fine in my kali linux

many thanks

Few short notes:

1 Like

Even in the weekly build (2023 week 32) of Kali with fully upgraded packages, PostgreSQL-15 is installed and occupying port 5432:

└─$ pg_lsclusters --no-header | awk '$3 == "5432" { print $1 }'

So while the need to migrate to PostgreSQL-16 is indeed on the forecast, it is not a hard requirement for now.

Otherwise, you can follow the instructions presented by @cfi.

From 0008472: Greenbone - Openvas - GVMD - incompatible library “/usr/lib/”: version mismatch - Kali Linux Bug Tracker:

I have uploaded a fix: gvmd version 22.9.0-0kali4 (it installs postgresql-16-pg-gvm version 22.6.2-1kali1 too).
It will be available in few hours.


postgresql-16-pg-gvm is now available, so please make sure to perform an update and a full-upgrade via apt

so it seems the Kali package maintaining team already uploaded a solution so any workarounds shouldn’t be required anymore.


And a more generic note:

For upgrading PostgreSQL from 15 to 16 manual user action is always required as this is AFAICT not done automatically. And when not doing these steps the user is left behind with unsupported and unmaintained PostgreSQL server packages which has even security implications.

See the following posts below for a few additional notes. I had suggested to ask the Kali team (or even Debian as Kali is AFAICT also only taking the PostgreSQL packages from Debian) for better documentation around this topic as users seems to struggle quite often with this (Greenbone software unrelated) administrative tasks.


Sorry that I am new here when trying to install openvas in latest Kali. and I am having the same issue here.
I did the update and full-upgrade via apt. But the gvm-setup still gives me:
Creating extension pg-gvm
ERROR: extension “pg-gvm” is not available
DETAIL: Could not open extension control file “/usr/share/postgresql/16/extension/pg-gvm.control”: No such file or directory.

What exact steps I shall do to fix this issue? I have been struggling on this issue for many days.

This looks like a packaging issue / problem which can’t be solved by Greenbone or the Greenbone Community.

Please raise a new issue over here for investigation by the Kali packaging team: