新建虛擬機后啟動時出現如下錯誤:
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. Re-setup the kernel module by executing
'/etc/init.d/vboxdrv setup'
as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
執行/etc/init.d/vboxdrv setup后,出現了以下的錯誤:
[root@localhost ~]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [FAILED]
出現此原因是因為系統內核與VirtualBox要求的不一致,需安裝對應版本的Linux-headers,然后重啟或者使用dkms install 手動編譯virtualbox的那些模塊
解決方法:
1、更新內核
# dnf update kernel
2、reboot
3、重新執行編譯程序
# /etc/init.d/vboxdrv setup
4、執行完畢即可正常使用VirtualBox了