Hello

I am using Kali 2022.3 in a WSL2 VM (the minimal installation from the Microsoft Store)

Code:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:        2022.3
Codename:       kali-rolling
My problem is that metasploit-framework seems to require PostreSQL 13 to work:

Code:
$ sudo msfdb reinit[sudo] password for kali:
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
[+] Starting database
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
        Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
        Is the server running locally and accepting connections on that socket?
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
        Is the server running locally and accepting connections on that socket?
[+] Deleting configuration file /usr/share/metasploit-framework/config/database.yml
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
[i] Database already stopped
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
[+] Starting database
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
        Is the server running locally and accepting connections on that socket?
[+] Creating database user 'msf'
Error: PostgreSQL version 13 is not installed
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
        Is the server running locally and accepting connections on that socket?
[+] Creating databases 'msf'
Error: PostgreSQL version 13 is not installed
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
        Is the server running locally and accepting connections on that socket?
[+] Creating databases 'msf_test'
Error: PostgreSQL version 13 is not installed
[+] Creating configuration file '/usr/share/metasploit-framework/config/database.yml'
[+] Creating initial database schema
rake aborted!
The error doesn't look much different if I set the "PGPORT" variable to use Port 5433 (my PostgreSQL 14). And the kali sources do not seem to have a package for PostgreSQL 13:

Code:
$ sudo apt install postgresql-13Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package postgresql-13 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source


E: Package 'postgresql-13' has no installation candidate
I have tried to install PostgreSQL from a different source:

Code:
deb http://apt.postgresql.org/pub/repos/apt jammy-pgdg main
But that also didn't work as it required "libicu70" and the kali repos only seem to have "libicu71" and changing further dependencies seemed very hacky.

Is there a way to get this to work?