Ubuntu 23.04中linux-generic、linux-headers-generic等内核包依赖损坏无法升级的问题求助
Ubuntu 23.04中linux-generic、linux-headers-generic等内核包依赖损坏无法升级的问题求助
大家好,我在Ubuntu 23.04(Lunar Lobster)上尝试升级内核相关包时碰到了棘手的依赖问题,试了好几种操作都没能解决,想请社区的朋友们帮忙支支招。
首先我执行了系统更新命令:
$ sudo apt update Hit:1 http://lv.archive.ubuntu.com/ubuntu lunar InRelease Hit:2 http://lv.archive.ubuntu.com/ubuntu lunar-updates InRelease Hit:3 http://lv.archive.ubuntu.com/ubuntu lunar-backports InRelease Hit:4 https://dl.winehq.org/wine-builds/ubuntu kinetic InRelease Get:5 http://security.ubuntu.com/ubuntu lunar-security InRelease [109 kB] Hit:6 https://dl.google.com/linux/chrome/deb stable InRelease Fetched 109 kB in 0s (280 kB/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done 3 packages can be upgraded. Run 'apt list --upgradable' to see them.
接着查看可升级的包,发现是三个内核相关的包:
$ apt list --upgradable Listing... Done linux-generic/lunar-updates 6.2.0.24.24 amd64 [upgradable from: 6.2.0.23.23] linux-headers-generic/lunar-updates 6.2.0.24.24 amd64 [upgradable from: 6.2.0.23.23] linux-image-generic/lunar-updates 6.2.0.24.24 amd64 [upgradable from: 6.2.0.23.23]
我先尝试直接执行升级命令,但系统提示这些包被保留了:
$ sudo apt upgrade Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages have been kept back: linux-generic linux-headers-generic linux-image-generic 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
于是我尝试手动安装这三个包,结果出现了依赖未满足的错误:
$ sudo apt install linux-generic linux-headers-generic linux-image-generic Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: linux-headers-generic : Depends: linux-headers-6.2.0-24-generic but it is not installable linux-image-generic : Depends: linux-image-6.2.0-24-generic but it is not going to be installed Depends: linux-modules-extra-6.2.0-24-generic but it is not installable E: Unable to correct problems, you have held broken packages.
最后附上我的系统版本信息:
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 23.04 Release: 23.04 Codename: lunar
我已经试过sudo apt -f install这类常规修复依赖的命令,但问题依然存在。有没有朋友遇到过类似情况,或者知道怎么解决这个问题呢?
备注:内容来源于stack exchange,提问作者Martins Pukitis
相关产品推荐
相关产品推荐

