损坏的 VirtualBox 安装阻止使用 dpkg

损坏的 VirtualBox 安装阻止使用 dpkg

我尝试安装 VirtualBox,但安装到一半时想起上次执行此操作时在执行 UEFI 安全启动时失败了,重启笔记本电脑后我无法启动到 Ubuntu。

记住这一点后,我中途退出了安装,以防止再次发生这种情况。

现在,每次我尝试apt安装包时都会出现以下错误:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

运行列出的命令尝试卸载virtualbox并输出以下输出:

Setting up virtualbox-dkms (5.2.18-dfsg-2~ubuntu18.04.1) ...
Removing old virtualbox-5.2.18 DKMS files...

-------- Uninstall Beginning --------
Module:  virtualbox
Version: 5.2.18
Kernel:  4.15.0-39-generic (x86_64)
-------------------------------------

Status: This module version was INACTIVE for this kernel.
depmod...

DKMS: uninstall completed.

------------------------------
Deleting module version: 5.2.18
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-5.2.18 DKMS files...
Building for 4.15.0-39-generic
Building initial module for 4.15.0-39-generic

然后,这将加载下面熟悉的 UEFI 屏幕:

配置安全启动

问题是我害怕继续该屏幕以防它再次失败并破坏我的启动过程。

如何dpkg在不继续 UEFI 配置过程的情况下修复错误?

附加信息:

~ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic

~ sudo apt list | grep virtualbox
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

boinc-virtualbox/bionic-updates 7.9.3+dfsg-5ubuntu2 amd64
unity-scope-virtualbox/bionic,bionic 0.1+13.10.20130723-0ubuntu1 all
virtualbox/bionic-updates,now 5.2.18-dfsg-2~ubuntu18.04.1 amd64 [installed]
virtualbox-dkms/bionic-updates,bionic-updates,now 5.2.18-dfsg-2~ubuntu18.04.1 all [installed,automatic]
virtualbox-ext-pack/bionic-updates,bionic-updates 5.2.18-1~ubuntu18.04.1 all
virtualbox-guest-additions-iso/bionic-updates,bionic-updates 5.2.18-1~ubuntu18.04.1 all
virtualbox-guest-dkms/bionic-updates,bionic-updates 5.2.18-dfsg-2~ubuntu18.04.1 all
virtualbox-guest-dkms-hwe/bionic-updates,bionic-updates 5.2.18-dfsg-3~ubuntu18.04.1 all
virtualbox-guest-source/bionic-updates,bionic-updates 5.2.18-dfsg-2~ubuntu18.04.1 all
virtualbox-guest-source-hwe/bionic-updates,bionic-updates 5.2.18-dfsg-3~ubuntu18.04.1 all
virtualbox-guest-utils/bionic-updates 5.2.18-dfsg-2~ubuntu18.04.1 amd64
virtualbox-guest-utils-hwe/bionic-updates 5.2.18-dfsg-3~ubuntu18.04.1 amd64
virtualbox-guest-x11/bionic-updates 5.2.18-dfsg-2~ubuntu18.04.1 amd64
virtualbox-guest-x11-hwe/bionic-updates 5.2.18-dfsg-3~ubuntu18.04.1 amd64
virtualbox-qt/bionic-updates,now 5.2.18-dfsg-2~ubuntu18.04.1 amd64 [installed,automatic]
virtualbox-source/bionic-updates,bionic-updates 5.2.18-dfsg-2~ubuntu18.04.1 all

~ apt-get --help
apt 1.6.6 (amd64)

我对 Ubuntu 中的包管理的了解有限,如果能得到任何帮助我都很感激。

答案1

通过在 BIOS 设置中关闭安全启动、重新启动并运行来解决问题sudo dpkg --configure -a

相关内容