Same problem here with Ubuntu 22.04.4 LTS in a brand new AWS EC2 directly born as Ubuntu 22.
Setting up proftpd-core (1.3.7c+dfsg-1build1) ...
usermod: no changes
Synchronizing state of proftpd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable proftpd
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 142.
dpkg: error processing package proftpd-core (--configure):
installed proftpd-core package post-installation script subprocess returned error exit status 1
I fixed it editing /var/lib/dpkg/info/proftpd-core.postinst and commenting the deb-systemd-invoke commands, running the apt install another time and letting the postint script as it was after the package was installed correctly.
Same problem here with Ubuntu 22.04.4 LTS in a brand new AWS EC2 directly born as Ubuntu 22.
Setting up proftpd-core (1.3.7c+ dfsg-1build1) ... systemd- sysv-install. systemd- sysv-install enable proftpd deb-systemd- invoke line 142.
usermod: no changes
Synchronizing state of proftpd.service with SysV service script with /lib/systemd/
Executing: /lib/systemd/
Could not execute systemctl: at /usr/bin/
dpkg: error processing package proftpd-core (--configure):
installed proftpd-core package post-installation script subprocess returned error exit status 1
I fixed it editing /var/lib/ dpkg/info/ proftpd- core.postinst and commenting the deb-systemd-invoke commands, running the apt install another time and letting the postint script as it was after the package was installed correctly.