openssh-server (1:9.0p1-1ubuntu8.5) over (1:9.0p1-1ubuntu8)
...
Setting up openssh-server (1:9.0p1-1ubuntu8.5) ...
rescue-ssh.target is a disabled or a static unit not running, not starting it.
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145.
dpkg: error processing package openssh-server (--configure):
installed openssh-server package post-installation script subprocess returned error exit status 1
So this error was seen when upgrading from the release version of openssh in Lunar to the current latest version in updates.
I tried to reproduce in an lxc container. Had to downgrade 2 packages like so:
$ lxc launch ubuntu:lunar l
$ lxc shell l
# apt install -y openssh-client=1:9.0p1-1ubuntu8 -y --allow-downgrades
# apt install -y openssh-sftp-server=1:9.0p1-1ubuntu8 -y --allow-downgrades
upon downgrading openssh-server I see this error
Selecting previously unselected package openssh-server.
(Reading database ... 33940 files and directories currently installed.)
Preparing to unpack .../openssh-server_1%3a9.0p1-1ubuntu8_amd64.deb ...
Unpacking openssh-server (1:9.0p1-1ubuntu8) ...
Setting up openssh-server (1:9.0p1-1ubuntu8) ...
rescue-ssh.target is a disabled or a static unit not running, not starting it.
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145.
dpkg: error processing package openssh-server (--configure):
installed openssh-server package post-installation script subprocess returned error exit stat
us 1
dmesg: read kernel buffer failed: Operation not permitted Processing triggers for man-db (2.11.
2-1) ...
Processing triggers for ufw (0.36.1-4.1ubuntu0.1) ...
Errors were encountered while processing:
openssh-server
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
Attempting to upgrade to 8.5 I see:
root@l:~# apt-cache policy openssh-server
Setting up openssh-client (1:9.0p1-1ubuntu8.5) ...
Setting up openssh-sftp-server (1:9.0p1-1ubuntu8.5) ...
Setting up openssh-server (1:9.0p1-1ubuntu8.5) ...
rescue-ssh.target is a disabled or a static unit not running, not starting it.
Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 145.
dpkg: error processing package openssh-server (--configure):
installed openssh-server package post-installation script subprocess returned error exit stat
us 1
dmesg: read kernel buffer failed: Operation not permitted Processing triggers for man-db (2.11.
2-1) ...
Processing triggers for ufw (0.36.1-4.1ubuntu0.1) ...
Errors were encountered while processing:
openssh-server
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
Relevant Dpkg errors:
openssh-server (1:9.0p1- 1ubuntu8. 5) over (1:9.0p1-1ubuntu8) 1ubuntu8. 5) ... deb-systemd- invoke line 145.
...
Setting up openssh-server (1:9.0p1-
rescue-ssh.target is a disabled or a static unit not running, not starting it.
Could not execute systemctl: at /usr/bin/
dpkg: error processing package openssh-server (--configure):
installed openssh-server package post-installation script subprocess returned error exit status 1
So this error was seen when upgrading from the release version of openssh in Lunar to the current latest version in updates.
I tried to reproduce in an lxc container. Had to downgrade 2 packages like so: client= 1:9.0p1- 1ubuntu8 -y --allow-downgrades sftp-server= 1:9.0p1- 1ubuntu8 -y --allow-downgrades
$ lxc launch ubuntu:lunar l
$ lxc shell l
# apt install -y openssh-
# apt install -y openssh-
upon downgrading openssh-server I see this error
Selecting previously unselected package openssh-server. server_ 1%3a9.0p1- 1ubuntu8_ amd64.deb ... deb-systemd- invoke line 145.
Processing triggers for man-db (2.11. 4.1ubuntu0. 1) ...
(Reading database ... 33940 files and directories currently installed.)
Preparing to unpack .../openssh-
Unpacking openssh-server (1:9.0p1-1ubuntu8) ...
Setting up openssh-server (1:9.0p1-1ubuntu8) ...
rescue-ssh.target is a disabled or a static unit not running, not starting it.
Could not execute systemctl: at /usr/bin/
dpkg: error processing package openssh-server (--configure):
installed openssh-server package post-installation script subprocess returned error exit stat
us 1
dmesg: read kernel buffer failed: Operation not permitted
2-1) ...
Processing triggers for ufw (0.36.1-
Errors were encountered while processing:
openssh-server
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
Attempting to upgrade to 8.5 I see:
root@l:~# apt-cache policy openssh-server 1ubuntu8. 5) ... 1ubuntu8. 5) ... 1ubuntu8. 5) ... deb-systemd- invoke line 145.
Processing triggers for man-db (2.11. 4.1ubuntu0. 1) ...
Setting up openssh-client (1:9.0p1-
Setting up openssh-sftp-server (1:9.0p1-
Setting up openssh-server (1:9.0p1-
rescue-ssh.target is a disabled or a static unit not running, not starting it.
Could not execute systemctl: at /usr/bin/
dpkg: error processing package openssh-server (--configure):
installed openssh-server package post-installation script subprocess returned error exit stat
us 1
dmesg: read kernel buffer failed: Operation not permitted
2-1) ...
Processing triggers for ufw (0.36.1-
Errors were encountered while processing:
openssh-server
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)