更新 Linux 内核(ubuntu 14.04)时 dpkg 中断错误

更新 Linux 内核(ubuntu 14.04)时 dpkg 中断错误

当我运行软件更新程序来更新它在过程中告诉我要更新的内容时它就开始了。我所在的区域断电了......

当它再次回来时...我收到错误:E:dpkg 被中断,您必须手动运行“dpkg --configure -a”来纠正我运行 dpkg --configure -a ...问题仍然存在..重启后出现错误..然后我按 F 进行自动修复

登录后出现错误“dpkg 被中断,仍然无法修复...”仍然无法安装任何东西...正在谷歌搜索答案..

发现删除了 /var/lib/dpkg/updates 中的所有内容,运行 apt-get update...之后 apt-get install 再次运行

但是在安装 apt 之后...它继续之前的更新...然后再次出现错误..看起来像这样..

Setting up libtinfo-dev:i386 (5.9+20140118-1ubuntu1) ...
Setting up libncurses5-dev:i386 (5.9+20140118-1ubuntu1) ...
Setting up libssl-doc (1.0.1f-1ubuntu2.22) ...
Setting up zlib1g-dev:i386 (1:1.2.8.dfsg-1ubuntu1) ...
Setting up libssl-dev:i386 (1.0.1f-1ubuntu2.22) ...
Setting up linux-image-extra-4.4.0-63-generic (4.4.0-63.84~14.04.2) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-63-generic /boot/vmlinuz-4.4.0-63-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-63-generic /boot/vmlinuz-4.4.0-63-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-63-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-63-generic /boot/vmlinuz-4.4.0-63-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-63-generic /boot/vmlinuz-4.4.0-63-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-63-generic /boot/vmlinuz-4.4.0-63-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-63-generic
Found initrd image: /boot/initrd.img-4.4.0-63-generic
Found linux image: /boot/vmlinuz-4.4.0-59-generic
Found initrd image: /boot/initrd.img-4.4.0-59-generic
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found initrd image: /boot/initrd.img-4.4.0-57-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found initrd image: /boot/initrd.img-4.4.0-53-generic
Found linux image: /boot/vmlinuz-4.4.0-31-generic
Found initrd image: /boot/initrd.img-4.4.0-31-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
/usr/lib/os-probes/mounted/20microsoft: 49: /usr/lib/os-probes/mounted/20microsoft: cannot create /tmp/os-prober.pmV1Np/os-prober.tmp: Read-only file system
mv: cannot stat ‘/tmp/os-prober.pmV1Np/os-prober.tmp’: No such file or directory
rmdir: failed to remove ‘/var/lib/os-prober/mount’: Read-only file system
/usr/lib/os-probes/mounted/20microsoft: 49: /usr/lib/os-probes/mounted/20microsoft: cannot create /tmp/os-prober.pmV1Np/os-prober.tmp: Read-only file system
mv: cannot stat ‘/tmp/os-prober.pmV1Np/os-prober.tmp’: No such file or directory
rmdir: failed to remove ‘/var/lib/os-prober/mount’: Read-only file system
rmdir: failed to remove ‘/var/lib/os-prober/mount’: Read-only file system
rmdir: failed to remove ‘/var/lib/os-prober/mount’: Read-only file system
rmdir: failed to remove ‘/var/lib/os-prober/mount’: Read-only file system
rm: cannot remove ‘/tmp/os-prober.pmV1Np/swaps-map’: Read-only file system
rm: cannot remove ‘/tmp/os-prober.pmV1Np/mounted-map’: Read-only file system
rm: cannot remove ‘/tmp/os-prober.pmV1Np/raided-map’: Read-only file system
Found Windows 7 (loader) on /dev/sda1
cat: write error: Read-only file system
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-63-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic-lts-xenial:
 linux-image-generic-lts-xenial depends on linux-image-extra-4.4.0-63-generic; however:
  Package linux-image-extra-4.4.0-63-generic is not configured yet.

dpkg: error processing package linux-image-generic-lts-xenial (--configure):
 dependency problems - leaving unconfigured
Setting up linux-headers-4.4.0-63 (4.4.0-63.84~14.04.2) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: unrecoverable fatal error, aborting:
 unable to flush updated status of `linux-headers-4.4.0-63': Read-only file system
touch: cannot touch ‘/var/lib/update-notifier/dpkg-run-stamp’: Read-only file system
sh: 1: cannot create /var/lib/update-notifier/updates-available: Read-only file system
E: Sub-process /usr/bin/dpkg returned an error code (2)
E: Problem executing scripts DPkg::Post-Invoke 'if [ -d /var/lib/update-notifier ]; then touch /var/lib/update-notifier/dpkg-run-stamp; fi; if [ -e /var/lib/update-notifier/updates-available ]; then echo > /var/lib/update-notifier/updates-available; fi '
E: Sub-process returned an error code

有什么帮助吗?

这是 dmesg 输出

[  330.022171] sd 0:0:0:0: [sda] tag#12 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  330.022177] sd 0:0:0:0: [sda] tag#12 Sense Key : Medium Error [current] [descriptor] 
[  330.022182] sd 0:0:0:0: [sda] tag#12 Add. Sense: Unrecovered read error - auto reallocate failed
[  330.022188] sd 0:0:0:0: [sda] tag#12 CDB: Read(10) 28 00 00 8a d5 b5 00 00 01 00
[  330.022192] blk_update_request: I/O error, dev sda, sector 9098677
[  330.022198] Buffer I/O error on dev sda2, logical block 6024629, async page read
[  330.022217] ata1: EH complete
[  333.860534] ata1.00: exception Emask 0x0 SAct 0x1000000 SErr 0x0 action 0x0
[  333.860542] ata1.00: irq_stat 0x40000008
[  333.860548] ata1.00: failed command: READ FPDMA QUEUED
[  333.860557] ata1.00: cmd 60/01:c0:b5:d5:8a/00:00:00:00:00/40 tag 24 ncq 512 in
[  333.860557]          res 41/40:01:b5:d5:8a/00:00:00:00:00/60 Emask 0x409 (media error) <F>
[  333.860562] ata1.00: status: { DRDY ERR }
[  333.860565] ata1.00: error: { UNC }
[  333.862123] ata1.00: configured for UDMA/100
[  333.862147] sd 0:0:0:0: [sda] tag#24 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  333.862154] sd 0:0:0:0: [sda] tag#24 Sense Key : Medium Error [current] [descriptor] 
[  333.862160] sd 0:0:0:0: [sda] tag#24 Add. Sense: Unrecovered read error - auto reallocate failed
[  333.862166] sd 0:0:0:0: [sda] tag#24 CDB: Read(10) 28 00 00 8a d5 b5 00 00 01 00
[  333.862170] blk_update_request: I/O error, dev sda, sector 9098677
[  333.862176] Buffer I/O error on dev sda2, logical block 6024629, async page read
[  333.862198] ata1: EH complete
[  337.700536] ata1.00: exception Emask 0x0 SAct 0x20 SErr 0x0 action 0x0
[  337.700544] ata1.00: irq_stat 0x40000008
[  337.700550] ata1.00: failed command: READ FPDMA QUEUED
[  337.700559] ata1.00: cmd 60/01:28:b5:d5:8a/00:00:00:00:00/40 tag 5 ncq 512 in
[  337.700559]          res 41/40:01:b5:d5:8a/00:00:00:00:00/60 Emask 0x409 (media error) <F>
[  337.700564] ata1.00: status: { DRDY ERR }
[  337.700567] ata1.00: error: { UNC }
[  337.702137] ata1.00: configured for UDMA/100
[  337.702160] sd 0:0:0:0: [sda] tag#5 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  337.702166] sd 0:0:0:0: [sda] tag#5 Sense Key : Medium Error [current] [descriptor] 
[  337.702172] sd 0:0:0:0: [sda] tag#5 Add. Sense: Unrecovered read error - auto reallocate failed
[  337.702178] sd 0:0:0:0: [sda] tag#5 CDB: Read(10) 28 00 00 8a d5 b5 00 00 01 00
[  337.702183] blk_update_request: I/O error, dev sda, sector 9098677
[  337.702189] Buffer I/O error on dev sda2, logical block 6024629, async page read
[  337.702213] ata1: EH complete
[  341.544533] ata1.00: exception Emask 0x0 SAct 0x20000 SErr 0x0 action 0x0
[  341.544541] ata1.00: irq_stat 0x40000008
[  341.544548] ata1.00: failed command: READ FPDMA QUEUED
[  341.544558] ata1.00: cmd 60/01:88:b5:d5:8a/00:00:00:00:00/40 tag 17 ncq 512 in
[  341.544558]          res 41/40:01:b5:d5:8a/00:00:00:00:00/60 Emask 0x409 (media error) <F>
[  341.544563] ata1.00: status: { DRDY ERR }
[  341.544566] ata1.00: error: { UNC }
[  341.546121] ata1.00: configured for UDMA/100
[  341.546147] sd 0:0:0:0: [sda] tag#17 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  341.546154] sd 0:0:0:0: [sda] tag#17 Sense Key : Medium Error [current] [descriptor] 
[  341.546159] sd 0:0:0:0: [sda] tag#17 Add. Sense: Unrecovered read error - auto reallocate failed
[  341.546165] sd 0:0:0:0: [sda] tag#17 CDB: Read(10) 28 00 00 8a d5 b5 00 00 01 00
[  341.546169] blk_update_request: I/O error, dev sda, sector 9098677
[  341.546176] Buffer I/O error on dev sda2, logical block 6024629, async page read
[  341.546193] ata1: EH complete
[  343.728567] EXT4-fs error (device sda8): ext4_lookup:1576: inode #1068543: comm rm: 'mozstd-trackwhite-digest256.cache' linked to parent dir
[  343.748609] EXT4-fs error (device sda8): ext4_lookup:1583: inode #1068543: comm rm: deleted inode referenced: 1068568
[  343.757650] EXT4-fs error (device sda8): ext4_lookup:1583: inode #1068543: comm rm: deleted inode referenced: 1071323
[  343.768635] EXT4-fs error (device sda8): ext4_lookup:1583: inode #1068543: comm rm: deleted inode referenced: 1071324
[  343.779695] EXT4-fs error (device sda8): ext4_lookup:1583: inode #1068543: comm rm: deleted inode referenced: 1071325
[  343.790797] EXT4-fs error (device sda8): ext4_lookup:1583: inode #1068543: comm rm: deleted inode referenced: 1071326
[  343.801860] EXT4-fs error (device sda8): ext4_lookup:1583: inode #1068543: comm rm: deleted inode referenced: 1071327
[  343.813013] EXT4-fs error (device sda8): ext4_lookup:1583: inode #1068543: comm rm: deleted inode referenced: 1071328
[  343.824112] EXT4-fs error (device sda8): ext4_lookup:1583: inode #1068543: comm rm: deleted inode referenced: 1071329
[  858.968611] perf interrupt took too long (5001 > 5000), lowering kernel.perf_event_max_sample_rate to 25000

答案1

在 dpkg 运行过程中,您的根文件系统被重新挂载为只读。这可能是由于文件系统损坏造成的。检查输出以dmesg查看是否发生了这种情况。

编辑:既然您发布了 dmesg,看来您的硬盘快要坏了。记下所有关于未恢复的读取错误的条目。如果我是你,我会立即备份重要数据并更换硬盘。

相关内容