由于未配置 systemd,ubuntu 升级失败

由于未配置 systemd,ubuntu 升级失败
bben@bben-VG-MN9:~$ dpkg --configure --pending
dpkg: error: requested operation requires superuser privilege
bben@bben-VG-MN9:~$ sudo dpkg --configure --pending
[sudo] password for bben: 
Setting up systemd (237-3ubuntu10.33) ...
Synchronizing state of ondemand.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ondemand
Unsafe symlinks encountered in /var/log/journal, refusing.
Unsafe symlinks encountered in /var/log/journal, refusing.
Unsafe symlinks encountered in /var/log/journal, refusing.
Unsafe symlinks encountered in /var/log/journal, refusing.
Unsafe symlinks encountered in /var/log/journal/7f468aed7f324e088d8ca8beac1658e8, refusing.
Unsafe symlinks encountered in /var/log/journal/7f468aed7f324e088d8ca8beac1658e8, refusing.
Unsafe symlinks encountered in /var/log/journal/7f468aed7f324e088d8ca8beac1658e8, refusing.
Unsafe symlinks encountered in /var/log/journal/7f468aed7f324e088d8ca8beac1658e8, refusing.
Unsafe symlinks encountered in /var/log/journal/7f468aed7f324e088d8ca8beac1658e8/system.journal, refusing.
Unsafe symlinks encountered in /var/log/journal/7f468aed7f324e088d8ca8beac1658e8/system.journal, refusing.
dpkg: error processing package systemd (--configure):
 installed systemd package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of unity-greeter:
 unity-greeter depends on systemd; however:
  Package systemd is not configured yet.

dpkg: error processing package unity-greeter (--configure):
 dependency problems - leaving unconfigured
Setting up rsyslog (8.32.0-1ubuntu4) ...
The user `syslog' is already a member of `adm'.
Unsafe symlinks encountered in /var/spool/rsyslog, refusing.
Unsafe symlinks encountered in /var/log, refusing.
Unsafe symlinks encountered in /var/log/auth.log, refusing.
Unsafe symlinks encountered in /var/log/kern.log, refusing.
Unsafe symlinks encountered in /var/log/syslog, refusing.
dpkg: error processing package rsyslog (--configure):
 installed rsyslog package post-installation script subprocess returned error exit status 1
Setting up rarian-compat (0.8.1-6build1) ...
dpkg: dependency problems prevent configuration of libnss-systemd:amd64:
 libnss-systemd:amd64 depends on systemd (= 237-3ubuntu10.33); however:
  Package systemd is not configured yet.

dpkg: error processing package libnss-systemd:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpam-systemd:amd64:
 libpam-systemd:amd64 depends on systemd (= 237-3ubuntu10.33); however:
  Package systemd is not configured yet.

dpkg: error processing package libpam-systemd:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of iio-sensor-proxy:
 iio-sensor-proxy depends on systemd; however:
  Package systemd is not configured yet.

dpkg: error processing package iio-sensor-proxy (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of indicator-datetime:
 indicator-datetime depends on systemd; however:
  Package systemd is not configured yet.

dpkg: error processing package indicator-datetime (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of policykit-1:
 policykit-1 depends on libpam-systemd; however:
  Package libpam-systemd:amd64 is not configured yet.

dpkg: error processing package policykit-1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-system-log:
 gnome-system-log depends on policykit-1; however:
  Package policykit-1 is not configured yet.

dpkg: error processing package gnome-system-log (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of systemd-sysv:
 systemd-sysv depends on systemd; however:
  Package systemd is not configured yet.

dpkg: error processing package systemd-sysv (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gdm3:
 gdm3 depends on libpam-systemd; however:
  Package libpam-systemd:amd64 is not configured yet.
 gdm3 depends on policykit-1 (>= 0.105-5~); however:
  Package policykit-1 is not configured yet.

dpkg: error processing package gdm3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of unity:
 unity depends on unity-greeter; however:
  Package unity-greeter is not configured yet.

dpkg: error processing package unity (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of udisks2:
 udisks2 depends on libpam-systemd; however:
  Package libpam-systemd:amd64 is not configured yet.

dpkg: error processing package udisks2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of synaptic:
 synaptic depends on policykit-1; however:
  Package policykit-1 is not configured yet.

dpkg: error processing package synaptic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of netplan.io:
 netplan.io depends on systemd (>= 235-3ubuntu3); however:
  Package systemd is not configured yet.

dpkg: error processing package netplan.io (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of indicator-session:
 indicator-session depends on libpam-systemd; however:
  Package libpam-systemd:amd64 is not configured yet.

dpkg: error processing package indicator-session (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of dbus-user-session:
 dbus-user-session depends on libpam-systemd; however:
  Package libpam-systemd:amd64 is not configured yet.
 dbus-user-session depends on systemd; however:
  Package systemd is not configured yet.

dpkg: error processing package dbus-user-session (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of bleachbit:
 bleachbit depends on policykit-1; however:
  Package policykit-1 is not configured yet.

dpkg: error processing package bleachbit (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of plymouth:
 plymouth depends on systemd (>= 232-8~); however:
  Package systemd is not configured yet.

dpkg: error processing package plymouth (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of network-manager:
 network-manager depends on libpam-systemd; however:
  Package libpam-systemd:amd64 is not configured yet.
 network-manager depends on policykit-1; however:
  Package policykit-1 is not configured yet.

dpkg: error processing package network-manager (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of snapd:
 snapd depends on systemd; however:
  Package systemd is not configured yet.

dpkg: error processing package snapd (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of colord:
 colord depends on policykit-1 (>= 0.103); however:
  Package policykit-1 is not configured yet.

dpkg: error processing package colord (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of unity-session:
 unity-session depends on unity; however:
  Package unity is not configured yet.
 unity-session depends on dbus-user-session; however:
  Package dbus-user-session is not configured yet.
 unity-session depends on systemd (>= 231-9git1~); however:
  Package systemd is not configured yet.

dpkg: error processing package unity-session (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-system-service:
 ubuntu-system-service depends on policykit-1; however:
  Package policykit-1 is not configured yet.

dpkg: error processing package ubuntu-system-service (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nplan:
 nplan depends on netplan.io; however:
  Package netplan.io is not configured yet.

dpkg: error processing package nplan (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of policykit-1-gnome:
 policykit-1-gnome depends on policykit-1; however:
  Package policykit-1 is not configured yet.

dpkg: error processing package policykit-1-gnome (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of xdiagnose:
 xdiagnose depends on policykit-1; however:
  Package policykit-1 is not configured yet.

dpkg: error processing package xdiagnose (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-notifier:
 update-notifier depends on policykit-1; however:
  Package policykit-1 is not configured yet.

dpkg: error processing package update-notifier (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of aptdaemon:
 aptdaemon depends on policykit-1; however:
  Package policykit-1 is not configured yet.

dpkg: error processing package aptdaemon (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of rtkit:
 rtkit depends on policykit-1; however:
  Package policykit-1 is not configured yet.

dpkg: error processing package rtkit (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-desktop:
 ubuntu-desktop depends on gdm3; however:
  Package gdm3 is not configured yet.
 ubuntu-desktop depends on update-notifier; however:
  Package update-notifier is not configured yet.

dpkg: error processing package ubuntu-desktop (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-disk-utility:
 gnome-disk-utility depends on udisks2 (>= 2.7.6); however:
  Package udisks2 is not configured yet.

dpkg: error processing package gnome-disk-utility (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of lightdm:
 lightdm depends on plymouth (>= 0.8.8-0ubuntu18); however:
  Package plymouth is not configured yet.

dpkg: error processing package lightdm (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-initial-setup:
 gnome-initial-setup depends on policykit-1 (>= 0.103); however:
  Package policykit-1 is not configured yet.

dpkg: error processing package gnome-initial-setup (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager:
 update-manager depends on policykit-1; however:
  Package policykit-1 is not configured yet.
 update-manager depends on update-notifier; however:
  Package update-notifier is not configured yet.

dpkg: error processing package update-manager (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of brltty:
 brltty depends on policykit-1; however:
  Package policykit-1 is not configured yet.

dpkg: error processing package brltty (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of friendly-recovery:
 friendly-recovery depends on systemd-sysv; however:
  Package systemd-sysv is not configured yet.

dpkg: error processing package friendly-recovery (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-minimal:
 ubuntu-minimal depends on nplan; however:
  Package nplan is not configured yet.
  Package netplan.io which provides nplan is not configured yet.

dpkg: error processing package ubuntu-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of language-selector-gnome:
 language-selector-gnome depends on aptdaemon (>= 0.40+bzr527); however:
  Package aptdaemon is not configured yet.

dpkg: error processing package language-selector-gnome (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of packagekit:
 packagekit depends on policykit-1; however:
  Package policykit-1 is not configured yet.

dpkg: error processing package packagekit (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-standard:
 ubuntu-standard depends on libpam-systemd; however:
  Package libpam-systemd:amd64 is not configured yet.

dpkg: error processing package ubuntu-standard (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of plymouth-theme-ubuntu-logo:
 plymouth-theme-ubuntu-logo depends on plymouth (= 0.9.3-1ubuntu7.18.04.2); however:
  Package plymouth is not configured yet.

dpkg: error processing package plymouth-theme-ubuntu-logo (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of unity-control-center:
 unity-control-center depends on indicator-datetime; however:
  Package indicator-datetime is not configured yet.

dpkg: error processing package unity-control-center (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-gtk:
 ubuntu-release-upgrader-gtk depends on update-manager; however:
  Package update-manager is not configured yet.

dpkg: error processing package ubuntu-release-upgrader-gtk (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-settings-daemon:
 gnome-settings-daemon depends on libpam-systemd; however:
  Package libpam-systemd:amd64 is not configured yet.

dpkg: error processing package gnome-settings-daemon (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gvfs-daemons:
 gvfs-daemons depends on udisks2; however:
  Package udisks2 is not configured yet.

dpkg: error processing package gvfs-daemons (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mutter:
 mutter depends on gnome-settings-daemon; however:
  Package gnome-settings-daemon is not configured yet.

dpkg: error processing package mutter (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of usb-creator-common:
 usb-creator-common depends on udisks2; however:
  Package udisks2 is not configured yet.

dpkg: error processing package usb-creator-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of plymouth-label:
 plymouth-label depends on plymouth (= 0.9.3-1ubuntu7.18.04.2); however:
  Package plymouth is not configured yet.

dpkg: error processing package plymouth-label (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of usb-creator-gtk:
 usb-creator-gtk depends on usb-creator-common (= 0.3.5ubuntu18.04.2); however:
  Package usb-creator-common is not configured yet.

dpkg: error processing package usb-creator-gtk (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of network-manager-pptp:
 network-manager-pptp depends on network-manager (>= 1.2.0); however:
  Package network-manager is not configured yet.

dpkg: error processing package network-manager-pptp (--configure):
 dependency problems - leaving unconfigured
dpkg: too many errors, stopping
Errors were encountered while processing:
 systemd
 unity-greeter
 rsyslog
 libnss-systemd:amd64
 libpam-systemd:amd64
 iio-sensor-proxy
 indicator-datetime
 policykit-1
 gnome-system-log
 systemd-sysv
 gdm3
 unity
 udisks2
 synaptic
 netplan.io
 indicator-session
 dbus-user-session
 bleachbit
 plymouth
 network-manager
 snapd
 colord
 unity-session
 ubuntu-system-service
 nplan
 policykit-1-gnome
 xdiagnose
 update-notifier
 aptdaemon
 rtkit
 ubuntu-desktop
 gnome-disk-utility
 lightdm
 gnome-initial-setup
 update-manager
 brltty
 friendly-recovery
 ubuntu-minimal
 language-selector-gnome
 packagekit
 ubuntu-standard
 plymouth-theme-ubuntu-logo
 unity-control-center

以下是终端命令的输出
sudo dpkg --configure --pending

 ubuntu-release-upgrader-gtk


gnome-settings-daemon
 gvfs-daemons
 mutter
 usb-creator-common
 plymouth-label
 usb-creator-gtk
 network-manager-pptp
Processing was halted because there were too many errors.
bben@bben-VG-MN9:~$ 

答案1

我在升级到 Ubuntu 22.04 时也遇到了未配置 systemd 的问题。我得到了

Setting up systemd (249.11-0ubuntu3.4) ...
systemd-machine-id-setup: symbol lookup error: /lib/systemd/libsystemd-shared-249.so: undefined symbol: EVP_PKEY_get_base_id, version OPENSSL_3.0.0
dpkg: error processing package systemd (--configure):
 installed systemd package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of netplan.io:
 netplan.io depends on systemd (>= 248~); however:
  Package systemd is not configured yet.

ETC。

我发现这只是因为我在 /usr/local 中安装了我自己的 OpenSSL 3.1.0-dev 开发版本,它与 Ubuntu 升级机制不兼容。禁用该非官方 openssl 版本后,可以使用以下命令成功恢复升级

dpkg --configure -a

相关内容