我收到以下错误:
$ sudo dpkg --configure -a
Setting up initramfs-tools (0.122ubuntu8. 8) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-firmware (1.157.10) ...
update-initramfs: Generating /boot/initrd.img-uname
WARNING: missing /lib/modules/uname
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: Bad version passed uname
dpkg: warning: version 'uname' has bad syntax: version number does not start with digit
depmod: ERROR: Bad version passed uname
E: No boot partition found !
run-parts: /etc/initramfs/post-update.d//zz-flash-touch-initrd exited with return code 1
dpkg: error processing package linux-firmware (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic-hwe-16.04:
linux-image-generic-hwe-16.04 depends on linux-firmware; however:
Package linux-firmware is not configured yet.
dpkg: error processing package linux-image-generic-hwe-16.04 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-hwe-16.04:
linux-generic-hwe-16.04 depends on linux-image-generic-hwe-16.04 (= 4.8.0.52.23); however:
Package linux-image-generic-hwe-16.04 is not configured yet.
dpkg: error processing package linux-generic-hwe-16.04 (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.122ubuntu8.8) ...
update-initramfs: Generating /boot/initrd.img-uname
WARNING: missing /lib/modules/uname
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: Bad version passed uname
dpkg: warning: version 'uname' has bad syntax: version number does not start with digit
depmod: ERROR: Bad version passed uname
E: No boot partition found !
run-parts: /etc/initramfs/post-update.d//zz-flash-touch-initrd exited with return code 1
dpkg: error processing package initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
linux-firmware
linux-image-generic-hwe-16.04
linux-generic-hwe-16.04
initramfs-tools
似乎不知何故,uname
而不是uname -r
被传递,这使得应用程序无法知道我的系统的正确内核版本。或者可能是别的什么,我不知道......
我目前无法通过 sudo apt 安装(或重新安装)任何软件包。有谁知道这个问题的解决方案?
答案1
我通过以下方式找到了问题的解决方案这个答案在这个问题中:“apt-get dist-upgrade”报告错误“depmod:错误:错误版本通过了 uname”和各种警告:
您需要删除uname -r
以下所有内容,即不在表单报告中的内容/var/lib/initramfs-tools
。
答案2
我遇到了同样的错误,只是降级linux-firmware
包
sudo apt install linux-firmware=1.157
sudo apt-mark hold linux-firmware
在此软件包的任何较新版本上 -Bad version passed uname