我现在正在使用 ubuntu 20,从最近几天开始,软件更新程序会弹出一些需要安装的更新,当我单击安装时,它会启动安装过程,但一段时间后我收到此错误“安装或删除软件包失败。”
当我尝试使用终端更新时出现此错误
Errors were encountered while processing:
linux-headers-5.4.0-77
linux-headers-5.4.0-77-generic
linux-headers-generic
linux-headers-generic-hwe-18.04
linux-generic
linux-generic-hwe-18.04
所以我尝试安装 Linux 标头,但同样的错误不断出现
请在这件事上给予我帮助。
sudo apt full-upgrade
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.
6 not fully installed or removed.
Need to get 0 B/11.0 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing package linux-headers-5.4.0-77 (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
No apport report written because the error message indicates its a followup err
or from a previous failure.
dpkg: dependency problems prevent configuration of l
inux-headers-5.4.0-77-generic:
linux-headers-5.4.0-77-generic depends on linux-headers-5.4.0-77; however:
Package linux-headers-5.4.0-77 is not configured yet.
dpkg: error processing package linux-headers-5.4.0-77-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-headers-generic:
linux-headers-generic depends on linux-headers-5.4.0-77-generic; however:
Package linux-headers-5.4.0-77-generic is not configured yet.
dpkg: error processing package linux-headers-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-headers-generic-hwe-18
.04:
linux-headers-generic-hwe-18.04 depends on linux-headers-generic; however:
Package linux-headers-generic is not configured yet.
dpkg: error processing package linux-headers-generic-hwe-18.04 (--configure):
dNo apport report written because the error message indicates its a followup e
rror from a previous failure.
No apport report written because MaxReports is rea
ched already
No apport report written because MaxReports is reached already
No ap
port report written because MaxReports is reached already
ependency problems - l
eaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-headers-generic (= 5.4.0.77.80); however:
Package linux-headers-generic is not configured yet.
dpkg: error processing package linux-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-hwe-18.04:
linux-generic-hwe-18.04 depends on linux-generic; however:
Package linux-generic is not configured yet.
dpkg: error processing package linux-generic-hwe-18.04 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-headers-5.4.0-77
linux-headers-5.4.0-77-generic
linux-headers-generic
linux-headers-generic-hwe-18.04
linux-generic
linux-generic-hwe-18.04
E: Sub-process /usr/bin/dpkg returned an error code (1)
ps:我不明白什么是linux头文件,我也不太了解操作系统概念,所以请尝试添加命令如何实现你的答案
答案1
您正在使用 Ubuntu 20.04 但(例如)安装linux-headers-generic-hwe-18.04
检查您的存储库列表 - 它是 18.04 和 20.04 的混合吗?