I installed virtualbox using the official instruction on the oracle virtualbox website here: https://www.virtualbox.org/wiki/Linux_Downloads
I followed the method of adding the package source to my repositories. I am doing this rather than using the default installation from the ubuntu package repositories because I need to use a VM created in a newer version of virtualbox.
Installation went fine, except that virtualbox asks to rebook so you can register it with UFEI (sorry I don't know the correct jargon here). I dutifully rebooted, but was distracted and unfortunately missed the screen where you are prompted to do this at boot. Now I can't get the screen back, and when I try to uninstall vitualbox I get:
$ sudo apt-get remove virtualbox-6.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libgsoap-2.8.60 libqt5opengl5 libqt5x11extras5 libvncserver1
linux-headers-4.15.0-20 linux-headers-4.15.0-20-generic
linux-headers-4.15.0-72 linux-headers-4.15.0-72-generic
linux-image-4.15.0-20-generic linux-image-4.15.0-72-generic
linux-modules-4.15.0-20-generic linux-modules-4.15.0-72-generic
linux-modules-extra-4.15.0-20-generic linux-modules-extra-4.15.0-72-generic
virtualbox-dkms
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED
virtualbox-6.1
0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade.
After this operation, 216 MB disk space will be freed.
Do you want to continue? [Y/n]
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 496481 files and directories currently installed.)
Removing virtualbox-6.1 (6.1.2-135662~Ubuntu~bionic) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package virtualbox-6.1 (--remove):
installed virtualbox-6.1 package pre-removal script subprocess returned error exit status 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.
Errors were encountered while processing:
virtualbox-6.1
E: Sub-process /usr/bin/dpkg returned an error code (1)
and it won't let me uninstall.
I then tried following the advice in the error message an rerunning /sbin/vboxconfig
, but this fails with
$ sudo /sbin/vboxconfig
[sudo] password for rcrozier:
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: You must sign these kernel modules before using VirtualBox:
vboxdrv vboxnetflt vboxnetadp
See the documenatation for your Linux distribution..
vboxdrv.sh: Building VirtualBox kernel modules.
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
vboxdrv.sh: Failed to enroll secure boot key..
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.
What I really want is to again trigger the process of signing the kernal modules (or whatever) can anyone tell me how to do this?