2

I have tried to start ejabberd service with systemctl in Ubuntu 22.04, but I keep getting:

Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 142

1 Answers1

1

If you arrived here trying to install a package, you can fix it temporary while we wait for a fix allowing you to install the package.

Remember to change <package> with the name of the package you're getting the problem.

  • Look on /var/lib/dpkg/info/<package>.postinst
  • Edit that file and comment the lines with the deb-systemd-invoke commands. If they're inside a if/then which will be empty place a echo '1' to avoid problems with the empty if.
  • Run the apt install another time which should finish the installation
  • Edit the /var/lib/dpkg/info/<package>.postinst another time and leave it as it was before.
  • Enable the service /lib/systemd/systemd-sysv-install enable <package>