今天尝试更新我的系统。更新已完成,但当我使用sudo apt autoremove
或sudo apt upgrade
sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-headers-5.4.0-48-generic (5.4.0-48.52) ...
/etc/kernel/header_postinst.d/dkms:
* dkms: running auto installation service for kernel 5.4.0-48-generic
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/anbox-ashmem/1/source/dkms.conf does not exist.
...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 4
dpkg: error processing package linux-headers-5.4.0-48-generic (--configure):
installed linux-headers-5.4.0-48-generic package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-headers-generic:
linux-headers-generic depends on linux-headers-5.4.0-48-generic; however:
Package linux-headers-5.4.0-48-generic is not configured yet.
dpkg: error processing package linux-headers-generic (--configure):
dependency problems - leaving unconfigured
Setting up linux-image-5.4.0-48-generic (5.4.0-48.52) ...
No apport report written because the error message indicates it's a follow-up error from a previous failure.
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-headers-generic (= 5.4.0.48.51); however:
Package linux-headers-generic is not configured yet.
dpkg: error processing package linux-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
Processing triggers for linux-image-5.4.0-48-generic (5.4.0-48.52) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.4.0-48-generic
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/anbox-ashmem/1/source/dkms.conf does not exist.
...fail!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 4
dpkg: error processing package linux-image-5.4.0-48-generic (--configure):
installed linux-image-5.4.0-48-generic package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports has already been reached
Errors were encountered while processing:
linux-headers-5.4.0-48-generic
linux-headers-generic
linux-generic
linux-image-5.4.0-48-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
我正在使用自定义内核
uname -r
5.8.9-050809-generic
我谷歌了一下提到的第一个错误anbox-ashmem
,看到了一些非常复杂(对我来说)的讨论,因此我决定在这里发帖以避免破坏我的系统。我现在可以重新启动并正常使用一切。
答案1
sudo dpkg-reconfigure [package]
似乎是一种常用的解决方法,但它并不总是有效。
解决方案来自并且可能重复:`错误!无法找到 dkms.conf 文件`