Kali/Debian gvmd bug - fixed in 26.2.1-1 (was: Is there an accurate guide for Kali Linux in 2025?)

All the guides I can find for most distros like Alpine, Kali are way out of date, most of them referring to this as OpenVAS when that product is no more it’s Greenbone since a long time.

I tried this on the latest up to date:

No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2025.3
Codename: kali-rolling

For example here is what the forum suggest (some guide from 2024): https://greenbone.github.io/docs/latest/22.4/kali/

At gvm-setup there is an error with Postgres already ( I tried to reinstall all the packages incl db multiple times doesn’t help): 
md   main:   INFO:2025-08-28 20h12.08 utc:756261: gvmd: databases are already at the supported version[>] Checking for GVM admin usermd   main:MESSAGE:2025-08-28 20h12.08 utc:756292:    Greenbone Vulnerability Manager version 26.2.0 (DB revision 262)md manage:   INFO:2025-08-28 20h12.08 utc:756292:    Getting users.md manage:WARNING:2025-08-28 20h12.08 utc:756292: sql_exec_internal: PQexec failed: ERROR:  relation “public.meta” does not existLINE 1: SELECT value FROM public.meta WHERE name = 'database_version…^(7)md manage:WARNING:2025-08-28 20h12.08 utc:756292: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = ‘database_version’;md manage:WARNING:2025-08-28 20h12.08 utc:756292: sql_x: sql_exec_internal failedmd manage:MESSAGE:2025-08-28 20h12.08 utc:756292: No SCAP database foundmd manage:MESSAGE:2025-08-28 20h12.08 utc:756292: No CERT database foundmd manage:WARNING:2025-08-28 20h12.10 utc:756292: sql_exec_internal: PQexec failed: ERROR:  relation “scanners” does not exist(7)md manage:WARNING:2025-08-28 20h12.10 utc:756292: sql_exec_internal: SQL: CREATE TABLE IF NOT EXISTS agents (id SERIAL PRIMARY KEY,  uuid UUID NOT NULL UNIQUE,  name TEXT NOT NULL,  agent_id TEXT UNIQUE NOT NULL,  scanner INTEGER NOT NULL REFERENCES scanners (id) ON DELETE RESTRICT,  hostname TEXT,  authorized INTEGER NOT NULL,  min_interval INTEGER,  heartbeat_interval INTEGER,  connection_status TEXT,  last_update INTEGER,  schedule TEXT,  owner INTEGER REFERENCES users (id) ON DELETE RESTRICT,  comment TEXT,  creation_time INTEGER,  modification_time INTEGER);md manage:WARNING:2025-08-28 20h12.10 utc:756292: sqlv: sql_exec_internal failed[] Creating user admin for gvmmd   main:MESSAGE:2025-08-28 20h12.10 utc:756304:    Greenbone Vulnerability Manager version 26.2.0 (DB revision 262)md manage:   INFO:2025-08-28 20h12.10 utc:756304:    Creating user.md manage:WARNING:2025-08-28 20h12.10 utc:756304: sql_exec_internal: PQexec failed: ERROR:  relation “public.meta” does not existLINE 1: SELECT value FROM public.meta WHERE name = 'database_version…^(7)md manage:WARNING:2025-08-28 20h12.10 utc:756304: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = ‘database_version’;md manage:WARNING:2025-08-28 20h12.10 utc:756304: sql_x: sql_exec_internal failedmd manage:MESSAGE:2025-08-28 20h12.10 utc:756304: No SCAP database foundmd manage:MESSAGE:2025-08-28 20h12.10 utc:756304: No CERT database foundmd manage:WARNING:2025-08-28 20h12.11 utc:756304: sql_exec_internal: PQexec failed: ERROR:  relation “scanners” does not exist(7)md manage:WARNING:2025-08-28 20h12.11 utc:756304: sql_exec_internal: SQL: CREATE TABLE IF NOT EXISTS agents (id SERIAL PRIMARY KEY,  uuid UUID NOT NULL UNIQUE,  name TEXT NOT NULL,  agent_id TEXT UNIQUE NOT NULL,  scanner INTEGER NOT NULL REFERENCES scanners (id) ON DELETE RESTRICT,  hostname TEXT,  authorized INTEGER NOT NULL,  min_interval INTEGER,  heartbeat_interval INTEGER,  connection_status TEXT,  last_update INTEGER,  schedule TEXT,  owner INTEGER REFERENCES users (id) ON DELETE RESTRICT,  comment TEXT,  creation_time INTEGER,  modification_time INTEGER);md manage:WARNING:2025-08-28 20h12.11 utc:756304: sqlv: sql_exec_internal failed[] Please note the generated admin password[][] Configure Feed Import OwnerERROR:  relation “settings” does not existLINE 1: SELECT value FROM settings WHERE uuid = '78eceaec-3385-11ea-…^[*] Define Feed Import Ownermd   main:MESSAGE:2025-08-28 20h12.11 utc:756328:    Greenbone Vulnerability Manager version 26.2.0 (DB revision 262)md manage:   INFO:2025-08-28 20h12.11 utc:756328:    Getting users.md manage:WARNING:2025-08-28 20h12.11 utc:756328: sql_exec_internal: PQexec failed: ERROR:  relation “public.meta” does not existLINE 1: SELECT value FROM public.meta WHERE name = 'database_version…^(7)md manage:WARNING:2025-08-28 20h12.11 utc:756328: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = ‘database_version’;md manage:WARNING:2025-08-28 20h12.11 utc:756328: sql_x: sql_exec_internal failedmd manage:MESSAGE:2025-08-28 20h12.11 utc:756328: No SCAP database foundmd manage:MESSAGE:2025-08-28 20h12.11 utc:756328: No CERT database foundmd manage:WARNING:2025-08-28 20h12.13 utc:756328: sql_exec_internal: PQexec failed: ERROR:  relation “scanners” does not exist(7)md manage:WARNING:2025-08-28 20h12.13 utc:756328: sql_exec_internal: SQL: CREATE TABLE IF NOT EXISTS agents (id SERIAL PRIMARY KEY,  uuid UUID NOT NULL UNIQUE,  name TEXT NOT NULL,  agent_id TEXT UNIQUE NOT NULL,  scanner INTEGER NOT NULL REFERENCES scanners (id) ON DELETE RESTRICT,  hostname TEXT,  authorized INTEGER NOT NULL,  min_interval INTEGER,  heartbeat_interval INTEGER,  connection_status TEXT,  last_update INTEGER,  schedule TEXT,  owner INTEGER REFERENCES users (id) ON DELETE RESTRICT,  comment TEXT,  creation_time INTEGER,  modification_time INTEGER);md manage:WARNING:2025-08-28 20h12.13 utc:756328: sqlv: sql_exec_internal failed
(gvmd:756349): md   main-CRITICAL **: 16:12:13.600: gvmd: g_option_context_parse: Missing argument for --value

Hello,

and welcome to this community forums.

AFAICT this is the correct and most up2date guide.

Please keep in mind while the guide is the correct one the packages on Kali might not work fully / as expected. These packages are not maintained by Greenbone and might be in an unknown state.

If there are issues with the Kali packages it would be the best to drop the package maintainer over here as line:

1 Like

@Jett

“So what was the problem? Just install a fresh Kali and then install the OpenVAS package. It will definitely work.”

Eero

Hello,

I tried it with 2 different clean installation it is broken on both.

So if the packages are broken why don’t you provide proper .deb packages for these platforms?

As far as I know only the 2 virtual appliances are available for download for Vmware/Virtualbox, if so then there is no point even keeping up an out of date guide as the users will just keep complaining.

@Jett Greenbone does not create Kali Linux packages. You need to report the issue to the Kali Linux package maintainers. For me, the Kali Linux packages have always worked, and I reinstall it monthly for product development purposes. Are you sure you’ve done it correctly? You can also try this installation script for Debian 12**: GitHub - Kastervo/OpenVAS-Installation: A secure, automated script to install and configure OpenVAS (Greenbone Community Edition) from source on Debian 12. Features GPG verification, self-signed SSL, and systemd integration.**

Eero

1 Like

You could post the issue here or report the problem to the Kali package maintainers at their issue tracker to get some support.

@Jett I’m quite sure this is an installation error. Check that the virtual machine has at least 80GB of disk space, 16GB of RAM, and preferably 4 or more virtual CPUs. Download the latest Kali Linux and run the following commands.

  • apt -y update
  • apt -y upgrade
  • apt -y install openvas
  • gvm-setup
  • gvm-check-setup

and then wait about hour to nvt feed to be syncronized.

Eero

@bricks

It seems there’s currently an issue with the GVM setup or something in the latest packaging. I just tested it. I tried to send an email to the package maintainer.

Eero

@bricks issue is related to databases. where I can find schema files to manually create gvmd database tables?

Eero

Hello,

Thanks a lot for this! Worked like a charm, everything builds, all the services are up and running, scanner works great. Just a heads up Debian 13 is out since August so you might consider making a new build, but to be honest even if OpenVAS would only work on Debian Wheezy I couldn’t care less, all I care is it’s working :joy:

1 Like

@Jett

“Debian 12 will be supported for a long time and is also the de facto development platform; that’s why.”

Eero

@bricks trying to debug this issue.

runuser -u _gvm – gvmd --get-users

output is very weird

md main:MESSAGE:2025-09-01 07h11.17 utc:1861: Greenbone Vulnerability Manager version 26.2.0 (DB revision 262)
md manage: INFO:2025-09-01 07h11.17 utc:1861: Getting users.
md manage:WARNING:2025-09-01 07h11.17 utc:1861: sql_exec_internal: PQexec failed: ERROR: relation “public.meta” does not exist
LINE 1: SELECT value FROM public.meta WHERE name = 'database_version…
^
(7)
md manage:WARNING:2025-09-01 07h11.17 utc:1861: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = ‘database_version’;
md manage:WARNING:2025-09-01 07h11.17 utc:1861: sql_x: sql_exec_internal failed
md manage:MESSAGE:2025-09-01 07h11.17 utc:1861: No SCAP database found
md manage:MESSAGE:2025-09-01 07h11.17 utc:1861: No CERT database found
md manage:WARNING:2025-09-01 07h11.17 utc:1861: sql_exec_internal: PQexec failed: ERROR: relation “scanners” does not exist
(7)
md manage:WARNING:2025-09-01 07h11.17 utc:1861: sql_exec_internal: SQL: CREATE TABLE IF NOT EXISTS agents (id SERIAL PRIMARY KEY, uuid UUID NOT NULL UNIQUE, name TEXT NOT NULL, agent_id TEXT UNIQUE NOT NULL, scanner INTEGER NOT NULL REFERENCES scanners (id) ON DELETE RESTRICT, hostname TEXT, authorized INTEGER NOT NULL, min_interval INTEGER, heartbeat_interval INTEGER, connection_status TEXT, last_update INTEGER, schedule TEXT, owner INTEGER REFERENCES users (id) ON DELETE RESTRICT, comment TEXT, creation_time INTEGER, modification_time INTEGER);
md manage:WARNING:2025-09-01 07h11.17 utc:1861: sqlv: sql_exec_internal failed

Eero

@Jett and @bricks and @chirichicic and others.

Looks like issue is now fixed at kali linux.

Hello,

Thanks for the notification.

I fixed gvmd in Debian and Kali. The fixed version is 26.2.1-1. It will be available in few hours in Kali (after the mirrors update).

I “introduced” the issue with the version 26.2.0-1. It was caused by the option “-DENABLE_AGENTS=1” that I added. I didn’t investigate more for the moment as my first goal was to fix this quickly.

Sophie

Eero

3 Likes

Quick note, I tried installing from source as documented here: https://greenbone.github.io/docs/latest/22.4/source-build/index.html

And it went smoothly until “Setting up an Admin User”. At that point, I run into exactly the same problem. My gvmd.log after running gvmd –create-user=admin:

md main:MESSAGE:2025-09-01 22h42.25 utc:175914: Greenbone Vulnerability Manager version 26.0.0 (DB revision 259)
md manage: INFO:2025-09-01 22h42.25 utc:175914: Creating user.
md manage:WARNING:2025-09-01 22h42.25 utc:175914: sql_exec_internal: PQexec failed: ERROR: relation “public.meta” does not exist
LINE 1: SELECT value FROM public.meta WHERE name = 'database_version…
^
(7)
md manage:WARNING:2025-09-01 22h42.25 utc:175914: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = ‘database_version’;
md manage:WARNING:2025-09-01 22h42.25 utc:175914: sql_x: sql_exec_internal failed
md manage:MESSAGE:2025-09-01 22h42.25 utc:175914: No SCAP database found
md manage:MESSAGE:2025-09-01 22h42.25 utc:175914: No CERT database found
md manage:WARNING:2025-09-01 22h42.25 utc:175914: sql_exec_internal: PQexec failed: ERROR: permission denied to set role “dba”
(7)
md manage:WARNING:2025-09-01 22h42.25 utc:175914: sql_exec_internal: SQL: SET ROLE “dba”;
md manage:WARNING:2025-09-01 22h42.25 utc:175914: sqlv: sql_exec_internal failed
md main:MESSAGE:2025-09-01 22h43.05 utc:176250: Greenbone Vulnerability Manager version 26.0.0 (DB revision 259)
md manage: INFO:2025-09-01 22h43.05 utc:176250: Creating user.
md manage:WARNING:2025-09-01 22h43.05 utc:176250: sql_exec_internal: PQexec failed: ERROR: relation “public.meta” does not exist
LINE 1: SELECT value FROM public.meta WHERE name = 'database_version…
^
(7)
md manage:WARNING:2025-09-01 22h43.05 utc:176250: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = ‘database_version’;
md manage:WARNING:2025-09-01 22h43.05 utc:176250: sql_x: sql_exec_internal failed
md manage:MESSAGE:2025-09-01 22h43.05 utc:176250: No SCAP database found
md manage:MESSAGE:2025-09-01 22h43.05 utc:176250: No CERT database found
md manage:WARNING:2025-09-01 22h43.05 utc:176250: sql_exec_internal: PQexec failed: ERROR: permission denied to set role “dba”
(7)
md manage:WARNING:2025-09-01 22h43.05 utc:176250: sql_exec_internal: SQL: SET ROLE “dba”;
md manage:WARNING:2025-09-01 22h43.05 utc:176250: sqlv: sql_exec_internal failed
md main:MESSAGE:2025-09-01 22h43.20 utc:176385: Greenbone Vulnerability Manager version 26.0.0 (DB revision 259)
md manage: INFO:2025-09-01 22h43.20 utc:176385: Creating user.
md manage:WARNING:2025-09-01 22h43.20 utc:176385: sql_exec_internal: PQexec failed: ERROR: relation “public.meta” does not exist
LINE 1: SELECT value FROM public.meta WHERE name = 'database_version…
^
(7)
md manage:WARNING:2025-09-01 22h43.20 utc:176385: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = ‘database_version’;
md manage:WARNING:2025-09-01 22h43.20 utc:176385: sql_x: sql_exec_internal failed
md manage:MESSAGE:2025-09-01 22h43.20 utc:176385: No SCAP database found
md manage:MESSAGE:2025-09-01 22h43.20 utc:176385: No CERT database found
md manage:WARNING:2025-09-01 22h43.20 utc:176385: sql_exec_internal: PQexec failed: ERROR: permission denied to set role “dba”
(7)
md manage:WARNING:2025-09-01 22h43.20 utc:176385: sql_exec_internal: SQL: SET ROLE “dba”;
md manage:WARNING:2025-09-01 22h43.20 utc:176385: sqlv: sql_exec_internal failed
md main:MESSAGE:2025-09-01 22h44.54 utc:177135: Greenbone Vulnerability Manager version 26.0.0 (DB revision 259)
md manage:WARNING:2025-09-01 22h44.54 utc:177136: sql_exec_internal: PQexec failed: ERROR: relation “public.meta” does not exist
LINE 1: SELECT value FROM public.meta WHERE name = 'database_version…
^
(7)
md manage:WARNING:2025-09-01 22h44.54 utc:177136: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = ‘database_version’;
md manage:WARNING:2025-09-01 22h44.54 utc:177136: sql_x: sql_exec_internal failed
md manage:MESSAGE:2025-09-01 22h44.54 utc:177136: No SCAP database found
md manage:MESSAGE:2025-09-01 22h44.54 utc:177136: No CERT database found
md manage:WARNING:2025-09-01 22h44.54 utc:177136: sql_exec_internal: PQexec failed: ERROR: permission denied to set role “dba”
(7)
md manage:WARNING:2025-09-01 22h44.54 utc:177136: sql_exec_internal: SQL: SET ROLE “dba”;
md manage:WARNING:2025-09-01 22h44.54 utc:177136: sqlv: sql_exec_internal failed
md main:MESSAGE:2025-09-01 22h45.05 utc:177242: Greenbone Vulnerability Manager version 26.0.0 (DB revision 259)
md manage:WARNING:2025-09-01 22h45.05 utc:177243: sql_exec_internal: PQexec failed: ERROR: relation “public.meta” does not exist
LINE 1: SELECT value FROM public.meta WHERE name = 'database_version…
^
(7)
md manage:WARNING:2025-09-01 22h45.05 utc:177243: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = ‘database_version’;
md manage:WARNING:2025-09-01 22h45.05 utc:177243: sql_x: sql_exec_internal failed
md manage:MESSAGE:2025-09-01 22h45.05 utc:177243: No SCAP database found
md manage:MESSAGE:2025-09-01 22h45.05 utc:177243: No CERT database found
md manage:WARNING:2025-09-01 22h45.05 utc:177243: sql_exec_internal: PQexec failed: ERROR: permission denied to set role “dba”
(7)
md manage:WARNING:2025-09-01 22h45.05 utc:177243: sql_exec_internal: SQL: SET ROLE “dba”;
md manage:WARNING:2025-09-01 22h45.05 utc:177243: sqlv: sql_exec_internal failed
md main:MESSAGE:2025-09-01 22h46.03 utc:177705: Greenbone Vulnerability Manager version 26.0.0 (DB revision 259)
md manage: INFO:2025-09-01 22h46.03 utc:177705: Creating user.
md manage:WARNING:2025-09-01 22h46.03 utc:177705: sql_open: PQconnectPoll failed
md manage:WARNING:2025-09-01 22h46.03 utc:177705: sql_open: PQerrorMessage (conn): connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: FATAL: role “root” does not exist
md manage:WARNING:2025-09-01 22h46.03 utc:177705: init_manage_open_db: sql_open failed

There seems to be something different with the postgres database setup than what is documented.

@ukonkornelius it looks like same issue that is fixed by installing newer gvmd version.

see my message. if you want source version, then you can try kali modified script at: netseevol/OpenVAS-Installation-kali-linux: A secure, automated script to install and configure OpenVAS (Greenbone Community Edition) from source on Kali-rolling release. Features GPG verification, self-signed SSL, and systemd integration.

Eero

1 Like

@ukonkornelius on source version, you need to add “-DENABLE_AGENTS=0” .. to fix the issue.

Eero

1 Like

Running

gvm-check-setup

give me thos messages

Step 5: Checking Postgresql DB and user …
Starting postgresql service
OK: Postgresql version and default port are OK.
gvmd | _gvm | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | |
16440|pg-gvm|10|2200|f|22.6||
md main:MESSAGE:2025-09-02 02h41.11 utc:424: Greenbone Vulnerability Manager version 26.2.0 (DB revision 262)
md manage: INFO:2025-09-02 02h41.11 utc:424: Getting users.
md manage:WARNING:2025-09-02 02h41.11 utc:424: sql_exec_internal: PQexec failed: ERROR: relation “public.meta” does not exist
LINE 1: SELECT value FROM public.meta WHERE name = 'database_version…
^
(7)
md manage:WARNING:2025-09-02 02h41.11 utc:424: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = ‘database_version’;
md manage:WARNING:2025-09-02 02h41.11 utc:424: sql_x: sql_exec_internal failed
md manage:MESSAGE:2025-09-02 02h41.11 utc:424: No SCAP database found
md manage:MESSAGE:2025-09-02 02h41.11 utc:424: No CERT database found
md manage:WARNING:2025-09-02 02h41.11 utc:424: sql_exec_internal: PQexec failed: ERROR: relation “scanners” does not exist
(7)
md manage:WARNING:2025-09-02 02h41.11 utc:424: sql_exec_internal: SQL: CREATE TABLE IF NOT EXISTS agents (id SERIAL PRIMARY KEY, uuid UUID NOT NULL UNIQUE, name TEXT NOT NULL, agent_id TEXT UNIQUE NOT NULL, scanner INTEGER NOT NULL REFERENCES scanners (id) ON DELETE RESTRICT, hostname TEXT, authorized INTEGER NOT NULL, min_interval INTEGER, heartbeat_interval INTEGER, connection_status TEXT, last_update INTEGER, schedule TEXT, owner INTEGER REFERENCES users (id) ON DELETE RESTRICT, comment TEXT, creation_time INTEGER, modification_time INTEGER);
md manage:WARNING:2025-09-02 02h41.11 utc:424: sqlv: sql_exec_internal failed
ERROR: No users found. You need to create at least one user to log in.
FIX: create a user by running ‘sudo runuser -u _gvm – gvmd --create-user= --password=’

How to solve? Distro is latest kali linux, and application is installed from binary (apt -y install)

(moderator note- merged threads)

@chirichicic see my message about buggy kali package. it takes some time to mirrors to update.

if you cannot wait, you can try my packages at: netseevol/kali-gvmd-bugfix: this fixes bug in kali gvmd installation error

Eero

2 Likes

Bug fixed, thanks.

1 Like