因此,我的电源在更新过程中断了,
并且sudo dpkg --configure -a
只是告诉我有关错误,它无法自动修复某些systemd:amd64
东西。
这就是我要做的全部工作:
sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of libnss-systemd:amd64:
libnss-systemd:amd64 depends on systemd (= 237-3ubuntu10.42); however:
Package systemd is not installed.
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.42); however:
Package systemd is not installed.
dpkg: error processing package libpam-systemd:amd64 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libnss-systemd:amd64
libpam-systemd:amd64
老实说...我真的不知道从哪里开始。
Package systemd is not installed
我的意思是,如果我只是从表面上理解错误信息,
那么我就会简单地尝试apt-get install systemd
,
但我有点怀疑它可能会更复杂
(“如果该工具足以自动诊断问题,那么它是否应该足以使固定它会自动恢复吗?”),
而且我不想冒险让事情变得更糟,
所以我认为我应该先找个人确认一下。
我该怎么办?
编辑:按照以下说明添加@guiverc 的评论
$ sudo apt -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
systemd
Suggested packages:
systemd-container
The following packages will be upgraded:
systemd
1 upgraded, 0 newly installed, 0 to remove and 47 not upgraded.
3 not fully installed or removed.
Need to get 0 B/2.914 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 221157 files and directories currently installed.)
Preparing to unpack .../systemd_237-3ubuntu10.42_amd64.deb ...
Unpacking systemd (237-3ubuntu10.42) over (237-3ubuntu10.41) ...
Setting up systemd (237-3ubuntu10.42) ...
Setting up libnss-systemd:amd64 (237-3ubuntu10.42) ...
Setting up libpam-systemd:amd64 (237-3ubuntu10.42) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for dbus (1.12.2-1ubuntu1.2) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
和
$ sudo apt update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Hit:2 http://ppa.launchpad.net/fish-shell/release-2/ubuntu bionic InRelease
Hit:3 http://de.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://de.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://de.archive.ubuntu.com/ubuntu bionic-backports InRelease
Fetched 88,7 kB in 2s (56,6 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
47 packages can be upgraded. Run 'apt list --upgradable' to see them.
[奇怪的旁注:显然它使用的是德国的档案,尽管我在加拿大?不知道我是否应该以某种方式解决这个问题……]