Ubuntu 20:“apt upgrade”反复失败,并显示“非法指令(核心转储)”

Ubuntu 20:“apt upgrade”反复失败,并显示“非法指令(核心转储)”

昨天,我尝试apt update; apt upgrade在 Ubuntu 20.04 安装上执行此操作。输出apt upgrade附在本文末尾。

标题说明了一切:我收到错误Illegal instruction (core dumped)。我尝试了各种方法来解决这个问题:

  • 强行删除tzdatantp,几天前似乎在同样的情况下失败了,但我没有注意到;
  • 重新安装它们 ->Illegal instruction (core dumped)并随后失败
  • 恢复到我拥有的最早的备份(解压/var/backups/dpkg.status.6.gz/var/lib/dpkg/status),然后apt update; apt upgrade:结果输出如下。

虽然没有任何实际证据,但我的直觉是其中一个软件包*apt*dpkg已损坏。如何重新安装这些软件包?我担心我的升级系统会完全崩溃。

我已经完成了,dpkg --get-selections > selections所以我可以保存/etc并进行干净的重新安装:我的关键数据位于磁盘上,我可以在重新安装后删除并重新安装。

我也想过尝试升级到 Ubuntu 20.10,但这似乎是一种冒险的解决方法。

有人可以分享一些智慧和/或建议吗?

史蒂夫


这是我所看到的(我添加了空白行来突出Illegal instruction (core dumped)显示它):

# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  libnetplan0 libnss-systemd libpam-systemd libsystemd0 libudev1 linux-firmware lsof netplan.io sosreport systemd systemd-sysv tar tzdata udev
14 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 108 MB/109 MB of archives.
After this operation, 85.0 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 tar arm64 1.30+dfsg-7ubuntu0.20.04.1 [227 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 udev arm64 245.4-4ubuntu3.4 [1320 kB]                                                                           
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libudev1 arm64 245.4-4ubuntu3.4 [73.8 kB]                                                                       
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 systemd-sysv arm64 245.4-4ubuntu3.4 [10.3 kB]                                                                   
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libnss-systemd arm64 245.4-4ubuntu3.4 [92.4 kB]                                                                 
Get:6 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libpam-systemd arm64 245.4-4ubuntu3.4 [175 kB]                                                                  
Get:7 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 systemd arm64 245.4-4ubuntu3.4 [3490 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libsystemd0 arm64 245.4-4ubuntu3.4 [251 kB]                                                                     
Get:9 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libnetplan0 arm64 0.101-0ubuntu3~20.04.2 [27.7 kB]                                                              
Get:10 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 netplan.io arm64 0.101-0ubuntu3~20.04.2 [92.3 kB]                                                              
Get:11 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 lsof arm64 4.93.2+dfsg-1ubuntu0.20.04.1 [246 kB]                                                               
Get:12 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 linux-firmware all 1.187.8 [102 MB]                                                                            
Get:13 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 sosreport arm64 4.0-1~ubuntu0.20.04.3 [237 kB]                                                                 
Fetched 108 MB in 4min 12s (431 kB/s)

Illegal instruction (core dumped)

(Reading database ... 166114 files and directories currently installed.)
Preparing to unpack .../tar_1.30+dfsg-7ubuntu0.20.04.1_arm64.deb ...
Unpacking tar (1.30+dfsg-7ubuntu0.20.04.1) over (1.30+dfsg-7) ...
Setting up tar (1.30+dfsg-7ubuntu0.20.04.1) ...
(Reading database ... 166114 files and directories currently installed.)
Preparing to unpack .../udev_245.4-4ubuntu3.4_arm64.deb ...
Unpacking udev (245.4-4ubuntu3.4) over (245.4-4ubuntu3.3) ...
Preparing to unpack .../libudev1_245.4-4ubuntu3.4_arm64.deb ...
Unpacking libudev1:arm64 (245.4-4ubuntu3.4) over (245.4-4ubuntu3.3) ...
Setting up libudev1:arm64 (245.4-4ubuntu3.4) ...
(Reading database ... 166114 files and directories currently installed.)
Preparing to unpack .../systemd-sysv_245.4-4ubuntu3.4_arm64.deb ...
Unpacking systemd-sysv (245.4-4ubuntu3.4) over (245.4-4ubuntu3.3) ...
Preparing to unpack .../libnss-systemd_245.4-4ubuntu3.4_arm64.deb ...
Unpacking libnss-systemd:arm64 (245.4-4ubuntu3.4) over (245.4-4ubuntu3.3) ...
Preparing to unpack .../libpam-systemd_245.4-4ubuntu3.4_arm64.deb ...
Unpacking libpam-systemd:arm64 (245.4-4ubuntu3.4) over (245.4-4ubuntu3.3) ...
Preparing to unpack .../systemd_245.4-4ubuntu3.4_arm64.deb ...
Unpacking systemd (245.4-4ubuntu3.4) over (245.4-4ubuntu3.3) ...
Preparing to unpack .../libsystemd0_245.4-4ubuntu3.4_arm64.deb ...
Unpacking libsystemd0:arm64 (245.4-4ubuntu3.4) over (245.4-4ubuntu3.3) ...
Setting up libsystemd0:arm64 (245.4-4ubuntu3.4) ...
(Reading database ... 166114 files and directories currently installed.)
Preparing to unpack .../0-libnetplan0_0.101-0ubuntu3~20.04.2_arm64.deb ...
Unpacking libnetplan0:arm64 (0.101-0ubuntu3~20.04.2) over (0.100-0ubuntu4~20.04.3) ...
Preparing to unpack .../1-netplan.io_0.101-0ubuntu3~20.04.2_arm64.deb ...
Unpacking netplan.io (0.101-0ubuntu3~20.04.2) over (0.100-0ubuntu4~20.04.3) ...
Preparing to unpack .../2-tzdata_2020f-0ubuntu0.20.04.1_all.deb ...
Unpacking tzdata (2020f-0ubuntu0.20.04.1) over (2020f-0ubuntu0.20.04) ...
Preparing to unpack .../3-lsof_4.93.2+dfsg-1ubuntu0.20.04.1_arm64.deb ...
Unpacking lsof (4.93.2+dfsg-1ubuntu0.20.04.1) over (4.93.2+dfsg-1) ...
Preparing to unpack .../4-linux-firmware_1.187.8_all.deb ...
Unpacking linux-firmware (1.187.8) over (1.187.7) ...
Preparing to unpack .../5-sosreport_4.0-1~ubuntu0.20.04.3_arm64.deb ...
Unpacking sosreport (4.0-1~ubuntu0.20.04.3) over (4.0-1~ubuntu0.20.04.2) ...
Setting up linux-firmware (1.187.8) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-1026-raspi
Using DTB: bcm2711-rpi-4-b.dtb
Installing /lib/firmware/5.4.0-1026-raspi/device-tree/broadcom/bcm2711-rpi-4-b.dtb into /boot/dtbs/5.4.0-1026-raspi/./bcm2711-rpi-4-b.dtb
Taking backup of bcm2711-rpi-4-b.dtb.
Installing new bcm2711-rpi-4-b.dtb.
Installing /lib/firmware/5.4.0-1026-raspi/device-tree/broadcom/bcm2711-rpi-4-b.dtb into /boot/dtbs/5.4.0-1026-raspi/./bcm2711-rpi-4-b.dtb
Taking backup of bcm2711-rpi-4-b.dtb.
Installing new bcm2711-rpi-4-b.dtb.
flash-kernel: deferring update (trigger activated)
update-initramfs: Generating /boot/initrd.img-5.4.0-1025-raspi
Using DTB: bcm2711-rpi-4-b.dtb
Installing /lib/firmware/5.4.0-1025-raspi/device-tree/broadcom/bcm2711-rpi-4-b.dtb into /boot/dtbs/5.4.0-1025-raspi/./bcm2711-rpi-4-b.dtb
Taking backup of bcm2711-rpi-4-b.dtb.
Installing new bcm2711-rpi-4-b.dtb.
Ignoring old or unknown version 5.4.0-1025-raspi (latest is 5.4.0-1026-raspi)
Setting up libnetplan0:arm64 (0.101-0ubuntu3~20.04.2) ...
Setting up systemd (245.4-4ubuntu3.4) ...
Illegal instruction (core dumped)
dpkg: error processing package systemd (--configure):
 installed systemd package post-installation script subprocess returned error exit status 132
dpkg: dependency problems prevent configuration of netplan.io:
 netplan.io depends on systemd (>= 239~); however:
  Package systemd is not configured yet.

dpkg: error processing package netplan.io (--configure):
 dependency problems - leaving unconfigured
Setting up tzdata (2020f-0ubuntu0.20.04.1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: error processing package tzdata (--configure):
 installed tzdata package post-installation script subprocess was killed by signal (Illegal instruction), core dumped
Setting up udev (245.4-4ubuntu3.4) ...
Illegal instruction (core dumped)
dpkg: error processing package udev (--configure):
 installed udev package post-installation script subprocess returned error exit status 132
No apport report written because MaxReports is reached already
                                                              Setting up lsof (4.93.2+dfsg-1ubuntu0.20.04.1) ...
Setting up sosreport (4.0-1~ubuntu0.20.04.3) ...
dpkg: dependency problems prevent configuration of libpam-systemd:arm64:
 libpam-systemd:arm64 depends on systemd (= 245.4-4ubuntu3.4); however:
  Package systemd is not configured yet.

dpkg: error processing package libpam-systemd:arm64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of systemd-sysv:
 systemd-sysv depends on systemd (= 245.4-4ubuntu3.4); however:
  Package systemd is not configured yet.
 systemd-sysv depends on systemd; however:
  Package systemd is not configured yet.

No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                                                                                                            dpkg: error processing package systemd-sysv (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnss-systemd:arm64:
 libnss-systemd:arm64 depends on systemd (= 245.4-4ubuntu3.4); however:
  Package systemd is not configured yet.

dpkg: error processing package libnss-systemd:arm64 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent processing triggers for ntp:
 ntp depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package ntp (--configure):
 dependency problems - leaving triggers unprocessed
No apport report written because MaxReports is reached already
                                                              Processing triggers for dbus (1.12.16-2ubuntu2.1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
Processing triggers for man-db (2.9.1-1) ...
Illegal instruction (core dumped)
Errors were encountered while processing:
 systemd
 netplan.io
 tzdata
 udev
 libpam-systemd:arm64
 systemd-sysv
 libnss-systemd:arm64
 ntp
Files have not changed, Decompression not needed
E: Sub-process /usr/bin/dpkg returned an error code (1)

相关内容