View Issue Details

IDProjectCategoryView StatusLast Update
0008565Kali LinuxGeneral Bugpublic2023-12-27 09:33
ReporterNunuking Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Summary0008565: ERROR: extension "pg-gvm" is not available
Description

I am new to Kali and I am trying to install openvas and everything was fine until when I try to check gvm setup. with cmd

$ sudo gvm-check-setup

Then i get the following error

ERROR: The Postgresql DB does not exist.
FIX: Run 'sudo runuser -u postgres -- /usr/share/gvm/create-postgresql-database'

ERROR: Your GVM-23.11.0 installation is not yet complete!

Please follow the instructions marked with FIX above and run this

When I run the FIX above, I get another error as below;

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 followed other solutions but i just get lost. Please, can someone be so kind to guide me on which steps to take??

Thanks for your time.

Activities

Nunuking

Nunuking

2023-12-18 14:49

reporter   ~0018717

I have tried to install "pg-gvm" extension. Using the following cmd;

apt-get install gcc cmake pkg-config libical-dev libglib2.0-dev postgresql-server-dev-16

i am trying to configure and build the extension using "cmake" using the cmd below;

cmake .
make && make install

But I am having the following issues;

CMake Warning:
Ignoring extra path from command line:

"."

CMake Error: The source directory "/home/parallels" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make: *** No targets specified and no makefile found. Stop.

If anyone can help, I will really appreciate it. I will continue to research and post updates as I go.

kingpazo

kingpazo

2023-12-20 08:50

reporter   ~0018718

the only easy way to fix this is just to remove everything related to pg-gvm even all the extensions through command then
you start to install from the start, this issue will be fixed, I used to have same error but now fixed and remember port is 9332

sbrun

sbrun

2023-12-20 09:40

manager   ~0018724

The extension is packaged in Kali. You can install it with:
apt install postgresql-16-pg-gvm
or
apt install pg-gvm

It should be installed by default when you install gvm. I don't know what happened on your installation. Is everything up-to-date?
You can check the installed version
dpkg -s postgresql-16-pg-gvm
You must have the version 22.6.2-1kali1

You also must run gvm-setup before running gvm-check-setup.

kali-bugreport

kali-bugreport

2023-12-20 16:10

reporter   ~0018732

Dup of 0008599?

kali-bugreport

kali-bugreport

2023-12-20 16:12

reporter   ~0018733

Sorry, i mean 0008559 and 0008549

Nunuking

Nunuking

2023-12-22 18:44

reporter   ~0018741

Thanks for your support @kingpazo @sbrun and @kali-bugreport.
I have seen something that might be the issue but don't know how to resolve it.
I tried to locate "pg-gvm" in my system and realized it is running in postgresql version 15 and when I check my postgresql version it says 16. You can see below;

locate pg-gvm
/usr/lib/postgresql/15/lib/libpg-gvm.so
/usr/share/doc/pg-gvm
/usr/share/doc/pg-gvm/changelog.Debian.gz
/usr/share/doc/pg-gvm/copyright
/usr/share/postgresql/15/extension/pg-gvm--1.0--22.4.0.sql
/usr/share/postgresql/15/extension/pg-gvm--22.4.0.sql
/usr/share/postgresql/15/extension/pg-gvm.control
/var/lib/dpkg/info/pg-gvm.list
/var/lib/dpkg/info/pg-gvm.md5sums

When I run version check;
ls /etc/postgresql/
16

How do I get the "pg-gvm" extension to the directory of the postgresql 16?

kingpazo

kingpazo

2023-12-22 20:53

reporter   ~0018742

Hello @Nunuking,

simply follow this step it will be fixed
1st: dont use locate, go to /usr/share/gvm/ delete everything
2nd: uninstall postgresql then reinstall it. then check by using pg_lsclusters you will find all available versions
from my side there are three available version 14,15 and 16 to run gvm you will need to change by choose
before you choose version you will need to change the port of version 16 from 54344 to 5432 because gvm run on postgresql version 16 with port 5432
to change you write this query in cmd: "sudo nano /etc/postgresql/16/main/postgresql.conf" in this configuration file find port the change it
3rd write "sudo pg_upgradecluster 14 main" this will help you to update from version 14 to 16
4th then your postgresql is ready then activate version 16 by type "sudo pg_ctlcluster 16 main start" then you're ready to go
5th run "sudo gvm-setup" after installing gvm then you're ready togo its done
I hope this will be helpful to you, let us know if its fixed

Nunuking

Nunuking

2023-12-23 06:39

reporter   ~0018744

Thanks @kingpazo for your support.
I followed all the steps and still get an error. This is when run "sudo gvm-check-setup." I get the following error this time

ERROR: The new extension pgcrypto does not exist for gvmd database
FIX: Run 'sudo runuser -u postgres -- /usr/share/gvm/create-postgresql-database'

When I run the fix, I get another error;

RROR: 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.

When I was following all the steps and re-installing postgresql, and ran "pg_lsclusters", I only see one version and that is version 16. Do you think it is an issue?

How do I install the pg-gvm extension ??

sbrun

sbrun

2023-12-27 09:33

manager   ~0018757

To install the pg-gvm extension:

apt install postgresql-16-pg-gvm

Issue History

Date Modified Username Field Change
2023-12-17 22:17 Nunuking New Issue
2023-12-18 14:49 Nunuking Note Added: 0018717
2023-12-20 08:50 kingpazo Note Added: 0018718
2023-12-20 09:40 sbrun Note Added: 0018724
2023-12-20 16:10 kali-bugreport Note Added: 0018732
2023-12-20 16:12 kali-bugreport Note Added: 0018733
2023-12-22 18:44 Nunuking Note Added: 0018741
2023-12-22 20:53 kingpazo Note Added: 0018742
2023-12-23 06:39 Nunuking Note Added: 0018744
2023-12-27 09:33 sbrun Note Added: 0018757