$ 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.
搜索了很多解决方案都无法处理,最后还是仔细看了报错信息,这里其实有一个很重要的提示信息Secure Boot you may need to sign the kernel modules
The above answer probably works fine, but if you want an easier time for it:
I was able to solve it by
booting into the BIOS and going > advanced (f7) > boot > scroll down to “secure boot” > change “Windows EUFI mode” to “other OS”
My virtualbox works perfectly now.
最后对于为为的解决方案就是进入BIOS系统之后,和这个答案每个硬件平台的BIOS版本会有所不同(我的硬件三HUAWEI MateBook X Pro 2022)找到”secure boot”关键词对应的默认直是enable,为改为disable,第一次修改没有其作用,是应推出的时候没有保存,第二次再修改选择save and exit,再进入ubuntu启动virtualbox就可以正常运作了。
最近在ubuntu22.04 安装virtualbox的时候遇到另外还有一个报错:
vboxdrv.sh: failed: Cannot change group vboxusers for device /dev/vboxdrv.
1 2 3 4 5 6 7 8 9 10 11 12 13
执行:/sbin/vboxconfig 输出如下报错 root@ice:~# /sbin/vboxconfig vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: failed: Cannot change group vboxusers for device /dev/vboxdrv.
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.