配置 virtualbox-dkms 时跳过不兼容的内核

配置 virtualbox-dkms 时跳过不兼容的内核

我有一个“主线”未签名内核(5.9.7,来自主线 PPA)和一些来自 Focal 的其他常规内核。尝试安装 virtualbox 时,它会尝试为 5.9.7 构建 dkms,失败而未尝试其他内核,并且有助于保持 virtualbox 未配置。如何让 apt 忽略某些内核的失败,甚至不尝试?

ERROR (dkms apport): kernel package linux-headers-5.9.7-050907-generic is not supported
Error! Bad return status for module build on kernel: 5.9.7-050907-generic (x86_64)
Consult /var/lib/dkms/virtualbox/6.1.10/build/make.log for more information.
dpkg: error processing package virtualbox-dkms (--configure):
 installed virtualbox-dkms package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of virtualbox:
 virtualbox depends on virtualbox-dkms (>= 6.1.10-dfsg-1~ubuntu1.20.04.1) | virtualbox-source (>= 6.1.10-dfsg-1~ubuntu1.20.04.1) | virtualbox-modules; however:
  Package virtualbox-dkms is not configured yet.
  Package virtualbox-source is not installed.
  Package virtualbox-modules is not installed.
  Package virtualbox-dkms which provides virtualbox-modules is not configured yet.

dpkg: error processing package virtualbox (--configure):
 dependency problems - leaving unconfigured

相关内容