每次我嘗試使用 apt 或 ubuntu 軟體時 Virtualbox-dkms 都會出現錯誤

每次我嘗試使用 apt 或 ubuntu 軟體時 Virtualbox-dkms 都會出現錯誤

自從我升級到 kernal 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 時。如果可能的話,我還想在不刪除虛擬機器的情況下修復此問題。任何幫助將不勝感激!謝謝。

相關內容