dpkg:discord 更新后处理软件包 linux-firmware(--configure)时出错

dpkg:discord 更新后处理软件包 linux-firmware(--configure)时出错

Discord 获得新更新后,我尝试安装它sudo apt-get install discord并收到此错误消息。我该如何修复此 linux-firmware 错误?

roxi@pop-os:~$ sudo apt-get install discord
Setting up linux-firmware (1.197+system76~1620141009~20.10~f54d87c) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-7614-generic
cryptsetup: WARNING: Resume target cryptswap uses a key file
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.11.0-7614-generic with 1.
dpkg: error processing package linux-firmware (--configure):
 installed linux-firmware package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-firmware
E: Sub-process /usr/bin/dpkg returned an error code (1)

因此我认为存在问题linux-firmware并找到了这篇文章:

dpkg:ubuntu 18.04 升级至 20.04.1 后处理软件包 linux-firmware(--configure)时出错 并遵循那里的建议。

因为sudo dpkg --configure -a我得到了:

roxi@pop-os:~$ sudo dpkg --configure -a
Setting up linux-firmware (1.197+system76~1620141009~20.10~f54d87c) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-7614-generic
cryptsetup: WARNING: Resume target cryptswap uses a key file
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.11.0-7614-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.137ubuntu12.1) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-7614-generic
cryptsetup: WARNING: Resume target cryptswap uses a key file
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.11.0-7614-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

为了sudo apt-get install -f

roxi@pop-os:~$  sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.137ubuntu12.1) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-firmware (1.197+system76~1620141009~20.10~f54d87c) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-7614-generic
cryptsetup: WARNING: Resume target cryptswap uses a key file
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.11.0-7614-generic with 1.
dpkg: error processing package linux-firmware (--configure):
 installed linux-firmware package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-firmware
E: Sub-process /usr/bin/dpkg returned an error code (1)
roxi@pop-os:~$  sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
2 not fully installed or removed.

对于sudo apt-get install -y linux-firmware:我收到一个弹出窗口,提示:“启动”卷仅剩余 4MB 磁盘空间。

然后尝试sudo apt autoremove并得到:

roxi@pop-os:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-firmware (1.197+system76~1620141009~20.10~f54d87c) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-7614-generic
cryptsetup: WARNING: Resume target cryptswap uses a key file
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.11.0-7614-generic with 1.
dpkg: error processing package linux-firmware (--configure):
 installed linux-firmware package post-installation script subprocess ret
urned error exit status 1
Errors were encountered while processing:
 linux-firmware
E: Sub-process /usr/bin/dpkg returned an error code (1)

对于建议的解决方案sudo apt install --reinstall linux-firmware得到:

roxi@pop-os:~$ sudo apt install --reinstall linux-firmware
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 23 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for linux-firmware:amd64

答案1

我通过手动搜索内核sudo dpkg --get-selections | grep linux并清除它们来修复它sudo dpkg --purge <name>

相关内容