GVM Setup PostgreSQL Error

How do I reinstall the PostgreSQL in Kali Linux?

This is the error I am receiving.
└─$ sudo gvm-setup

This script is provided and maintained by Debian and Kali.
If you find any issue in this script, please report it directly to Debian or Kali

[>] Starting PostgreSQL service
[-] ERROR: No PostgreSQL version uses the port 5432/TCP
[-] ERROR: libgvmd needs PostgreSQL 17 to use the port 5432
[-] ERROR: Use pg_upgradecluster to update your PostgreSQL cluster

Hello,

and welcome to this community portal.

For getting support with 3rd party components / software not provided by Greenbone it is suggested to get in touch with the support community of that product. In this case this could be:

1 Like

@nilah sounds like you have old or multiple psql versions installed?

apt-get remove —purge (package name)

or

reinstall kali..

Eero

There is a general overview of this process in the community docs: Kali Linux install troubleshooting section. You will need to adjust for the upgraded versions.

This is what I am getting;

sudo apt install postgresql-17 postgresql-contrib-17
Note, selecting ‘postgresql-17’ instead of ‘postgresql-contrib-17’
postgresql-17 is already the newest version (17.5-1).
postgresql-17 set to manually installed.
The following packages were automatically installed and are no longer required:
docker-buildx libopenh264-7 python3-poetry-dynamic-versioning
icu-devtools libpoppler145 python3-pywerview
libabsl20230802 libpython3.12-minimal python3-requests-ntlm
libdnnl3 libpython3.12-stdlib python3-setproctitle
libflac12t64 libpython3.12t64 python3-tomlkit
libfuse3-3 libutempter0 python3-wheel-whl
libgeos3.13.0 libxnnpack0 python3.12-tk
libglapi-mesa python3-aioconsole ruby-zeitwerk
libicu-dev python3-dunamai sphinx-rtd-theme-common
libjxl0.10 python3-nfsclient strongswan
liblbfgsb0 python3-packaging-whl
Use ‘sudo apt autoremove’ to remove them.

sudo systemctl start postgresql-17
Failed to start postgresql-17.service: Unit postgresql-17.service not found.

┌──(destiney㉿kali)-[~]
└─$ sudo systemctl enable postgresql-17
Failed to enable unit: Unit postgresql-17.service does not exist

I suggest starting from a fresh Kali installation and following our Guide for Installing Greebone on Kali Linux. From there, you can use the troubleshooting guide if needed. Unfortunately, providing support for basic Linux administration not common on this forum. :slight_smile:

2 Likes

@nilah just reinstall latest kali and then

export DEBIAN_FRONTEND=noninteractive

apt -y update; apt -y upgrade; apt -y install openvas

gvm-setup
gvm-check-setup

Eero

1 Like