我正在运行 Ubuntu 19.10,由于 Linux 内核 5.3 存在一些问题,我切换到了 5.4。现在,如果我想删除旧的 virtualbox dkms 文件 (virtualbox-6.0.14),dpkg 会退出并显示错误代码 10。有人能帮我吗?我在此处附加了 apt autoremove 的输出:
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up virtualbox-dkms (6.0.14-dfsg-1) ...
Removing old virtualbox-6.0.14 DKMS files...
------------------------------
Deleting module version: 6.0.14
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-6.0.14 DKMS files...
Building for 5.4.21-20.02.19.amdgpu.ubuntu
Building initial module for 5.4.21-20.02.19.amdgpu.ubuntu
ERROR (dkms apport): kernel package linux-headers-5.4.21-20.02.19.amdgpu.ubuntu is not supported
Error! Bad return status for module build on kernel: 5.4.21-20.02.19.amdgpu.ubuntu (x86_64)
Consult /var/lib/dkms/virtualbox/6.0.14/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)`
先感谢您!
答案1
我可以使用以下命令删除该包:
sudo apt remove --force-yes virtualbox-dkms