VirtualBox kernel driver not installed. The vboxdrv kernel module was either not loaded
or /dev/vboxdrv was not created for some reason. Re-setup the kernel module by executing ‘/etc/init.d/vboxdrv setup’ as root.
当我们运行 [OrientSun@localhost ~]$ sudo /etc/init.d/vboxdrv setup //重新编译VirtualBox的内核出现下面的错误 Stopping VirtualBox kernel module: vboxdrv. [确定]
Recompiling VirtualBox kernel module: vboxdrv [失败]
* Look at /var/log/vbox-install.log to find out what went wrong
我就用:cat /var/log/vbox-install.log
显示:Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again
原因是更新的时候升级了Linux kernel,所以vboxdrv需要重新编译。因为是从源里面直接更新的,没有Linux kernel的源文件,显然编译需要这些源文件。(编译需要GCC库文件,如果下面步骤出现失败请更新GCC库文件。命令是yum install gcc )