Fedora解決VirtualBox出現(xiàn)kernel driver not installed錯(cuò)誤

問(wèn)題

VirtualBox 運(yùn)行正常,但建立虛擬機(jī)打開(kāi)虛擬機(jī)報(bào)錯(cuò)如下:

Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
'/sbin/vboxconfig'
as root.
where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.

原因

出現(xiàn)此原因是因?yàn)橄到y(tǒng)內(nèi)核與VirtualBox要求的不一致,需安裝對(duì)應(yīng)版本的Linux-headers

解決方法

一般來(lái)說(shuō),軟件出現(xiàn)錯(cuò)誤都會(huì)有錯(cuò)誤碼,錯(cuò)誤提示和解決方法。
上面錯(cuò)誤提示是要用戶使用root權(quán)限執(zhí)行命令/sbin/vboxconfig來(lái)重新安裝內(nèi)核模塊,按提示操作來(lái)嘗試解決

$ sudo /sbin/vboxconfig

如果只出現(xiàn)下面的提示信息,說(shuō)明問(wèn)題已經(jīng)解決,重新運(yùn)行虛擬機(jī)檢驗(yàn)一下是否成功。

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.

如果出現(xiàn)下面的提示信息,說(shuō)明問(wèn)題還沒(méi)有解決

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.

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.

提示用戶安裝當(dāng)前內(nèi)核的header,然后再次運(yùn)行sudo /sbin/vboxconfig

$ sudo yum install kernel-devel
$ sudo yum install kernel-headers
$ sudo /sbin/sbin/vboxcofig

最后出現(xiàn)結(jié)果如下,問(wèn)題已經(jīng)解決

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules

重啟VirtualBox

參考:VirtualBox6.0安裝及配置

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容