dpkg: 处理软件包 initramfs-tools 时出错(--configure)

dpkg: 处理软件包 initramfs-tools 时出错(--configure)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up initramfs-tools (0.130ubuntu3.8) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-firmware (1.173.9) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-54-generic
/usr/share/initramfs-tools/hooks/fsck: 683: /usr/share/initramfs-tools/hooks/fsck: blkid: not found
/usr/share/initramfs-tools/hooks/fsck: 715: /usr/share/initramfs-tools/hooks/fsck: blkid: not found
/usr/share/initramfs-tools/hooks/fsck: 207: /usr/share/initramfs-tools/hooks/fsck: blkid: not found
Warning: couldn't identify filesystem type for fsck hook, ignoring.
/usr/share/initramfs-tools/hooks/resume: 683: /usr/share/initramfs-tools/hooks/resume: blkid: not found
/usr/share/initramfs-tools/hooks/resume: 715: /usr/share/initramfs-tools/hooks/resume: blkid: not found
W: initramfs-tools configuration sets RESUME=UUID=a48f7499-fdf2-4274-9247-b3ecae5544f7
W: but no matching swap device is available.
/usr/share/initramfs-tools/hooks/resume: 61: /usr/share/initramfs-tools/hooks/resume: blkid: not found
I: The initramfs will attempt to resume from /dev/sda1
I: Set the RESUME variable to override this.
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.15.0-54-generic with 1.
dpkg: error processing package linux-firmware (--configure):
 installed linux-firmware package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.130ubuntu3.8) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-54-generic
/usr/share/initramfs-tools/hooks/fsck: 683: /usr/share/initramfs-tools/hooks/fsck: blkid: not found
/usr/share/initramfs-tools/hooks/fsck: 715: /usr/share/initramfs-tools/hooks/fsck: blkid: not found
/usr/share/initramfs-tools/hooks/fsck: 207: /usr/share/initramfs-tools/hooks/fsck: blkid: not found
Warning: couldn't identify filesystem type for fsck hook, ignoring.
/usr/share/initramfs-tools/hooks/resume: 683: /usr/share/initramfs-tools/hooks/resume: blkid: not found
/usr/share/initramfs-tools/hooks/resume: 715: /usr/share/initramfs-tools/hooks/resume: blkid: not found
W: initramfs-tools configuration sets RESUME=UUID=a48f7499-fdf2-4274-9247-b3ecae5544f7
W: but no matching swap device is available.
/usr/share/initramfs-tools/hooks/resume: 61: /usr/share/initramfs-tools/hooks/resume: blkid: not found
I: The initramfs will attempt to resume from /dev/sda1
I: Set the RESUME variable to override this.
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.15.0-54-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-firmware
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)


$ dpkg -l | egrep -v '^ii|rc'

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
+++-=============================================-============================================-============-=====================================================================================
iF  initramfs-tools                               0.130ubuntu3.8                               all          generic modular initramfs generator (automation)
iF  linux-firmware                                1.173.9                                      all          Firmware for Linux kernel drivers

答案1

[解决了]

mdkir /tmp/util-linux
cd /tmp/util-linux
wget http://ftp.us.debian.org/debian/pool/main/u/util-linux/util-linux_2.29.2-1+deb9u1_amd64.deb
sudo dpkg -i util-linux_*.deb
sudo apt install -f

相关内容