我无法卸载 Oracle VirtualBox

我无法卸载 Oracle VirtualBox

我正在运行 Ubuntu 18.04.3 LTS(64 位)。

我从“virtualbox.org”下载了 Oracle VirtualBox 6.1 并安装了它。过了一段时间,我决定安装它的扩展包(也是从同一个网站),以运行需要它的机器。

然后,我的电脑启动速度开始变得非常慢,所以我搜索论坛来解决这个问题,但我找不到。我注意到“vboxdrv.service”加载需要很长时间,但我无法停用它。

为了搜索并尝试加快我的启动时间,我从应用程序的“首选项”中删除了 VirtualBox 的扩展包,因为我认为这是问题所在,但它不起作用,并且启动仍然很慢。

现在,我想删除整个应用程序(不移除虚拟机的硬盘)并从 Ubuntu 存储库重新安装 VirtualBox,看看这是否能解决问题。但问题是我无法卸载它。

我关注了以下帖子:

运行此命令:

sudo apt-get purge virtualbox-6.1:amd64

输出:

Leyendo lista de paquetes... Hecho
Creando árbol de dependencias       
Leyendo la información de estado... Hecho
Los paquetes indicados a continuación se instalaron de forma automática y ya no son necesarios.
  libqt5opengl5 libsdl-ttf2.0-0
Utilice «sudo apt autoremove» para eliminarlos.
Los siguientes paquetes se ELIMINARÁN:
  virtualbox-6.1*
0 actualizados, 0 nuevos se instalarán, 1 para eliminar y 0 no actualizados.
Se liberarán 216 MB después de esta operación.
¿Desea continuar? [S/n] S
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Leyendo la base de datos ... 211142 ficheros o directorios instalados actualmente.)
Desinstalando virtualbox-6.1 (6.1.0-135406~Ubuntu~bionic) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error al procesar el paquete virtualbox-6.1 (--remove):
 instalado virtualbox-6.1 paquete pre-removal guión el subproceso devolvió un error con estado de salida 1
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
Se encontraron errores al procesar:
 virtualbox-6.1
E: Sub-process /usr/bin/dpkg returned an error code (1)

运行此命令:

dpkg -l | grep virtualbox

输出:

ii  virtualbox-6.1                             6.1.0-135406~Ubuntu~bionic                      amd64        Oracle VM VirtualBox

有人可以帮我吗?

编辑:

尝试这样做(第一个输出):

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.

我在尝试运行“/sbin/vboxconfig”时遇到问题。这是由于安全启动,我必须先对内核模块进行签名,这样它们才能正常运行。

答案1

我通过在 BIOS 中暂时禁用 UEFI 安全启动而不是签署内核模块来解决这个问题。

然后我可以使用以下命令卸载它:

sudo apt-get purge virtualbox-6.1:amd64

一切顺利。然后,我再次启用了安全启动。(如果你想知道,它并没有解决我的启动时间问题)

相关内容