服务器(16.04 无头运行)重启后,我运行sudo apt-get update
并sudo apt-get dist-upgrade
更新软件包。第二条命令打印:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
执行完该命令后,我运行了前两个命令,它打印出了一大块文本,但2054 upgraded, 550 newly installed, 66 to remove and 5 not upgraded.
我没有继续,因为我不想破坏任何东西。
我没有在我的 PPA 中看到任何异常,这是预期的行为吗?
sudo apt update
编辑:按要求的输出:
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [49.0 kB]
Get:5 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [59.7 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:7 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,877 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [1,214 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [294 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,714 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [1,560 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [289 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:15 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [9,288 B]
Fetched 7,323 kB in 4s (1,502 kB/s)
(appstreamcli:4546): GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed
(appstreamcli:4546): GLib-CRITICAL **: g_strchomp: assertion 'string != NULL' failed
(appstreamcli:4546): GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed
(appstreamcli:4546): GLib-CRITICAL **: g_strchomp: assertion 'string != NULL' failed
(appstreamcli:4546): GLib-CRITICAL **: g_strchug: assertion 'string != NULL' failed
(appstreamcli:4546): GLib-CRITICAL **: g_strchomp: assertion 'string != NULL' failed
AppStream cache update completed, but some metadata was ignored due to errors.
Reading package lists... Done
Building dependency tree
Reading state information... Done
2067 packages can be upgraded. Run 'apt list --upgradable' to see them.
答案1
我的/etc/apt/sources.list
已更新至 18.04。我备份了该文件,因此我可以将其复制过来并解决问题。
如果我没有备份,我就必须用 替换所有出现bionic
的xenial
。