#1076530 init-system-helpers: Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 148.

#1076530#5
Date:
2024-07-17 21:39:35 UTC
From:
To:
Hey.

I've just got that error during an upgrade run:
# aptitude
Performing actions...
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
Reading changelogs... Done
apt-listchanges: Do you want to continue? [Y/n]
apt-listchanges: Mailing root: apt-listchanges: changelogs for heisenberg
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 489517 files and directories currently installed.)
Preparing to unpack .../archives/dpkg_1.22.7_amd64.deb ...
Unpacking dpkg (1.22.7) over (1.22.6) ...
Setting up dpkg (1.22.7) ...
(Reading database ... 489516 files and directories currently installed.)
Preparing to unpack .../00-dpkg-dev_1.22.7_all.deb ...
Unpacking dpkg-dev (1.22.7) over (1.22.6) ...
Preparing to unpack .../01-libdpkg-perl_1.22.7_all.deb ...
Unpacking libdpkg-perl (1.22.7) over (1.22.6) ...
Preparing to unpack .../02-nemo-font-manager_0.9.0-2_amd64.deb ...
Unpacking nemo-font-manager:amd64 (0.9.0-2) over (0.9.0-1) ...
Preparing to unpack .../03-font-manager_0.9.0-2_amd64.deb ...
Unpacking font-manager (0.9.0-2) over (0.9.0-1) ...
Preparing to unpack .../04-font-viewer_0.9.0-2_amd64.deb ...
Unpacking font-viewer (0.9.0-2) over (0.9.0-1) ...
Preparing to unpack .../05-font-manager-common_0.9.0-2_amd64.deb ...
Unpacking font-manager-common:amd64 (0.9.0-2) over (0.9.0-1) ...
Preparing to unpack .../06-glibc-doc-reference_2.39-1_all.deb ...
Unpacking glibc-doc-reference (2.39-1) over (2.38-1) ...
Preparing to unpack .../07-openjdk-17-dbg_17.0.12+7-1_amd64.deb ...
Unpacking openjdk-17-dbg:amd64 (17.0.12+7-1) over (17.0.12~6ea-1) ...
Preparing to unpack .../08-openjdk-17-jre-zero_17.0.12+7-1_amd64.deb ...
Unpacking openjdk-17-jre-zero:amd64 (17.0.12+7-1) over (17.0.12~6ea-1) ...
Preparing to unpack .../09-openjdk-17-jdk_17.0.12+7-1_amd64.deb ...
Unpacking openjdk-17-jdk:amd64 (17.0.12+7-1) over (17.0.12~6ea-1) ...
Preparing to unpack .../10-openjdk-17-jre_17.0.12+7-1_amd64.deb ...
Unpacking openjdk-17-jre:amd64 (17.0.12+7-1) over (17.0.12~6ea-1) ...
Preparing to unpack .../11-openjdk-17-jdk-headless_17.0.12+7-1_amd64.deb ...
Unpacking openjdk-17-jdk-headless:amd64 (17.0.12+7-1) over (17.0.12~6ea-1) ...
Preparing to unpack .../12-openjdk-17-jre-headless_17.0.12+7-1_amd64.deb ...
Unpacking openjdk-17-jre-headless:amd64 (17.0.12+7-1) over (17.0.12~6ea-1) ...
Preparing to unpack .../13-jmapviewer_2.20+dfsg-1_all.deb ...
Unpacking jmapviewer (2.20+dfsg-1) over (2.19+dfsg-1) ...
Preparing to unpack .../14-libcares2_1.32.2-1_amd64.deb ...
Unpacking libcares2:amd64 (1.32.2-1) over (1.31.0-1) ...
Preparing to unpack .../15-libgc1_1%3a8.2.6-2_amd64.deb ...
Unpacking libgc1:amd64 (1:8.2.6-2) over (1:8.2.6-1) ...
Preparing to unpack .../16-libqt6core6t64_6.6.2+dfsg-10_amd64.deb ...
Unpacking libqt6core6t64:amd64 (6.6.2+dfsg-10) over (6.6.2+dfsg-9) ...
Preparing to unpack .../17-libqt6dbus6_6.6.2+dfsg-10_amd64.deb ...
Unpacking libqt6dbus6:amd64 (6.6.2+dfsg-10) over (6.6.2+dfsg-9) ...
Preparing to unpack .../18-libqt6gui6_6.6.2+dfsg-10_amd64.deb ...
Unpacking libqt6gui6:amd64 (6.6.2+dfsg-10) over (6.6.2+dfsg-9) ...
Preparing to unpack .../19-libqt6network6_6.6.2+dfsg-10_amd64.deb ...
Unpacking libqt6network6:amd64 (6.6.2+dfsg-10) over (6.6.2+dfsg-9) ...
Preparing to unpack .../20-libqt6opengl6_6.6.2+dfsg-10_amd64.deb ...
Unpacking libqt6opengl6:amd64 (6.6.2+dfsg-10) over (6.6.2+dfsg-9) ...
Preparing to unpack .../21-libqt6widgets6_6.6.2+dfsg-10_amd64.deb ...
Unpacking libqt6widgets6:amd64 (6.6.2+dfsg-10) over (6.6.2+dfsg-9) ...
Preparing to unpack .../22-libqt6openglwidgets6_6.6.2+dfsg-10_amd64.deb ...
Unpacking libqt6openglwidgets6:amd64 (6.6.2+dfsg-10) over (6.6.2+dfsg-9) ...
Preparing to unpack .../23-libqt6printsupport6_6.6.2+dfsg-10_amd64.deb ...
Unpacking libqt6printsupport6:amd64 (6.6.2+dfsg-10) over (6.6.2+dfsg-9) ...
Preparing to unpack .../24-libqt6xml6_6.6.2+dfsg-10_amd64.deb ...
Unpacking libqt6xml6:amd64 (6.6.2+dfsg-10) over (6.6.2+dfsg-9) ...
Preparing to unpack .../25-loudgain_0.6.8+ds-4_amd64.deb ...
Unpacking loudgain (0.6.8+ds-4) over (0.6.8+ds-3+b2) ...
Preparing to unpack .../26-nbd-client_1%3a3.26.1-4_amd64.deb ...
Unpacking nbd-client (1:3.26.1-4) over (1:3.26.1-2) ...
Preparing to unpack .../27-nbd-server_1%3a3.26.1-4_amd64.deb ...
Unpacking nbd-server (1:3.26.1-4) over (1:3.26.1-2) ...
Preparing to unpack .../28-openjdk-17-doc_17.0.12+7-1_all.deb ...
Unpacking openjdk-17-doc (17.0.12+7-1) over (17.0.12~6ea-1) ...
Preparing to unpack .../29-qemu-utils_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-utils (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../30-qemu-system-data_1%3a9.0.2+ds-1_all.deb ...
Unpacking qemu-system-data (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../31-qemu-system-x86_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-system-x86 (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../32-qemu-system-sparc_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-system-sparc (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../33-qemu-system-ppc_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-system-ppc (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../34-qemu-system-misc_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-system-misc (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../35-qemu-system-mips_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-system-mips (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../36-qemu-system-modules-spice_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-system-modules-spice (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../37-qemu-system-modules-opengl_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-system-modules-opengl (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../38-qemu-system-gui_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-system-gui (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../39-qemu-system-arm_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-system-arm (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../40-qemu-system-common_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-system-common (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../41-qemu-system_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-system (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../42-qemu-user-binfmt_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-user-binfmt (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../43-qemu-user_1%3a9.0.2+ds-1_amd64.deb ...
Unpacking qemu-user (1:9.0.2+ds-1) over (1:9.0.1+ds-1) ...
Preparing to unpack .../44-qt6-gtk-platformtheme_6.6.2+dfsg-10_amd64.deb ...
Unpacking qt6-gtk-platformtheme:amd64 (6.6.2+dfsg-10) over (6.6.2+dfsg-9) ...
Preparing to unpack .../45-thunderbird_1%3a115.13.0-1_amd64.deb ...
Unpacking thunderbird (1:115.13.0-1) over (1:115.12.0-1) ...
Preparing to unpack .../46-yt-dlp_2024.07.16-1_all.deb ...
Unpacking yt-dlp (2024.07.16-1) over (2024.07.09-1) ...
Setting up libqt6core6t64:amd64 (6.6.2+dfsg-10) ...
Setting up loudgain (0.6.8+ds-4) ...
Setting up glibc-doc-reference (2.39-1) ...
Setting up qemu-system-common (1:9.0.2+ds-1) ...
Setting up jmapviewer (2.20+dfsg-1) ...
Setting up nbd-server (1:3.26.1-4) ...
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 148.
Setting up font-manager-common:amd64 (0.9.0-2) ...
Setting up libqt6xml6:amd64 (6.6.2+dfsg-10) ...
Setting up qemu-user (1:9.0.2+ds-1) ...
Setting up libcares2:amd64 (1.32.2-1) ...
Setting up libgc1:amd64 (1:8.2.6-2) ...
Setting up qemu-system-data (1:9.0.2+ds-1) ...
Setting up libdpkg-perl (1.22.7) ...
Setting up yt-dlp (2024.07.16-1) ...
Setting up openjdk-17-jre-headless:amd64 (17.0.12+7-1) ...
Setting up qemu-system-arm (1:9.0.2+ds-1) ...
Setting up openjdk-17-doc (17.0.12+7-1) ...
Setting up nbd-client (1:3.26.1-4) ...
update-initramfs: deferring update (trigger activated)
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up thunderbird (1:115.13.0-1) ...
Setting up qemu-utils (1:9.0.2+ds-1) ...
Setting up qemu-user-binfmt (1:9.0.2+ds-1) ...
Setting up libqt6dbus6:amd64 (6.6.2+dfsg-10) ...
Setting up qemu-system-modules-opengl (1:9.0.2+ds-1) ...
Setting up qemu-system-gui (1:9.0.2+ds-1) ...
Setting up qemu-system-mips (1:9.0.2+ds-1) ...
Setting up qemu-system-sparc (1:9.0.2+ds-1) ...
Setting up qemu-system-x86 (1:9.0.2+ds-1) ...
Setting up qemu-system-ppc (1:9.0.2+ds-1) ...
Setting up dpkg-dev (1.22.7) ...
Setting up qemu-system-misc (1:9.0.2+ds-1) ...
Setting up font-viewer (0.9.0-2) ...
Setting up libqt6gui6:amd64 (6.6.2+dfsg-10) ...
Setting up qt6-gtk-platformtheme:amd64 (6.6.2+dfsg-10) ...
Setting up qemu-system (1:9.0.2+ds-1) ...
Setting up qemu-system-modules-spice (1:9.0.2+ds-1) ...
Setting up libqt6network6:amd64 (6.6.2+dfsg-10) ...
Setting up libqt6opengl6:amd64 (6.6.2+dfsg-10) ...
Setting up libqt6widgets6:amd64 (6.6.2+dfsg-10) ...
Setting up libqt6openglwidgets6:amd64 (6.6.2+dfsg-10) ...
Setting up libqt6printsupport6:amd64 (6.6.2+dfsg-10) ...
Processing triggers for libc-bin (2.39-4) ...
Processing triggers for systemd (256.2-1) ...
Processing triggers for man-db (2.12.1-2) ...
Processing triggers for libglib2.0-0t64:amd64 (2.80.4-1) ...
Setting up font-manager (0.9.0-2) ...
Processing triggers for install-info (7.1-3+b1) ...
Processing triggers for desktop-file-utils (0.27-2) ...
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.9.9-amd64
Processing triggers for hicolor-icon-theme (0.18-1) ...
Processing triggers for doc-base (0.11.2) ...
Processing 3 changed doc-base files...
Setting up nemo-font-manager:amd64 (0.9.0-2) ...
Processing triggers for ca-certificates-java (20240118) ...
done.
Setting up openjdk-17-dbg:amd64 (17.0.12+7-1) ...
Setting up openjdk-17-jdk-headless:amd64 (17.0.12+7-1) ...
Setting up openjdk-17-jre-zero:amd64 (17.0.12+7-1) ...
Setting up openjdk-17-jre:amd64 (17.0.12+7-1) ...
Setting up openjdk-17-jdk:amd64 (17.0.12+7-1) ...
Scanning processes...
Scanning candidates...
Scanning processor microcode...
Scanning linux images...

Running kernel seems to be up-to-date.

The processor microcode seems to be up-to-date.

Restarting services...
Service restarts being deferred:
 /etc/needrestart/restart.d/dbus.service
 systemctl restart lightdm.service
 systemctl restart systemd-logind.service

No containers need to be restarted.

User sessions running outdated binaries:
…

No VM guests are running outdated hypervisor (qemu) binaries on this host.
Press Return to continue, 'q' followed by Return to quit.


Seems similar to #1010893, but different line.


Cheers,
Chris.

#1076530#10
Date:
2025-08-20 19:05:28 UTC
From:
To:
Hi,

this issue can be reproduced by installing the following two debs:

*
https://people.debian.org/~gioele/bug-1076530/aptitude-common_0.8.13-7.1_all.deb
*
https://people.debian.org/~gioele/bug-1076530/aptitude_0.8.13-7.1_amd64.deb

```
$ sudo dpkg -i aptitude-common_*.deb aptitude_*.deb
(Reading database ... 49656 files and directories currently installed.)
Preparing to unpack aptitude-common_0.8.13-7.1_all.deb ...
Unpacking aptitude-common (0.8.13-7.1) over (0.8.13-7.1) ...
Preparing to unpack aptitude_0.8.13-7.1_amd64.deb ...
Unpacking aptitude (0.8.13-7.1) over (0.8.13-7.1) ...
Setting up aptitude-common (0.8.13-7.1) ...
Setting up aptitude (0.8.13-7.1) ...
aptitude-backup.service is a disabled or a static unit not running, not
starting it.
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 148.
Processing triggers for man-db (2.13.1-1) ...
```

Line 148 is

```
147    if (@start_units) {
148        system('systemctl', '--quiet', @instance_args, $action,
@start_units) == 0 or die("Could not execute systemctl: $!");
149    }
```

The list of packages installed on my machine can be found at
https://people.debian.org/~gioele/bug-1076530/dpkg-l.txt

Regards,

#1076530#17
Date:
2025-08-20 21:16:29 UTC
From:
To:
Hi,

here is the key part of the traced postinst:

D000002: fork/exec /var/lib/dpkg/info/aptitude.postinst ( configure
0.8.13-7.1 )
+ [ configure = configure ]
+ command -v update-menus
+ [ -x  ]
+ [ configure = configure ]
+ deb-systemd-helper unmask aptitude-backup.timer
+ deb-systemd-helper --quiet was-enabled aptitude-backup.timer
+ deb-systemd-helper enable aptitude-backup.timer
+ [ configure = configure ]
+ [ -d /run/systemd/system ]
+ systemctl --system daemon-reload
+ [ -n 0.8.13-7.1 ]
+ _dh_action=restart
+ deb-systemd-invoke restart aptitude-backup.service aptitude-backup.timer
aptitude-backup.service is a disabled or a static unit not running, not
starting it.
systemctl --quiet --system restart aptitude-backup.timer
Job failed. See "journalctl -xe" for details.
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 148.

The snippet being executed is "postinst-systemd-restart" [1].

journalctl -xe does not show any line related to this error.

[1]
https://salsa.debian.org/debian/debhelper/-/blob/main/autoscripts/postinst-systemd-restart#L9

Regards,