每次我尝试使用 apt 或 ubuntu 软件时,Virtualbox-dkms 都会出错

每次我尝试使用 apt 或 ubuntu 软件时,Virtualbox-dkms 都会出错

自从我升级到内核 5.11.0-051100rc2-generic 以修复我遇到的问题后,每次我尝试使用 apt 命令或 ubuntu 软件应用程序时,都会出现错误。在 Ubuntu 软件中,这看起来像“安装软件包时出错:已安装的 virtualbox-dkms 软件包安装后脚本子进程返回错误退出状态 10”。每次我尝试使用 apt 安装程序时,它都会返回错误,而且它们通常无法正常运行。我尝试清除 virtualbox 以尝试修复错误,但我只是得到

$ sudo apt-get remove --purge virtualbox 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfprint-2-tod1 libgsoap-2.8.91 libllvm10 liblzf1
  libnvidia-common-450-server libvncserver1
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  virtualbox*
0 upgraded, 0 newly installed, 1 to remove and 24 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up virtualbox-dkms (6.1.16-dfsg-6~ubuntu1.20.04.1) ...
Removing old virtualbox-6.1.16 DKMS files...

------------------------------
Deleting module version: 6.1.16
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-6.1.16 DKMS files...
Building for 5.11.0-051100rc2-generic
Building initial module for 5.11.0-051100rc2-generic
ERROR (dkms apport): kernel package linux-headers-5.11.0-051100rc2-generic is not supported
Error! Bad return status for module build on kernel: 5.11.0-051100rc2-generic (x86_64)
Consult /var/lib/dkms/virtualbox/6.1.16/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
Errors were encountered while processing:
 virtualbox-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

当我尝试使用 apt 时,仍然出现该错误。然后我做了

$dkms status
virtualbox, 6.1.16: added

$sudo dkms remove virtualbox/6.1.16 --all

------------------------------
Deleting module version: 6.1.16
completely from the DKMS tree.
------------------------------
Done.

但我仍然得到

Errors were encountered while processing:
 virtualbox-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

尝试使用 apt。如果可能的话,我还想在不删除虚拟机的情况下修复此问题。如能得到任何帮助,我将不胜感激!谢谢。

相关内容