安装virtual box后无法启动虚拟机:
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (2.6.38-16-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /etc/init.d/vboxdrv setup
You will not be able to start VMs until this problem is fixed.
错误提示需要运行命令 sudo /etc/init.d/vboxdrv setup
但此命令无法成功执行,提示:
* Stopping VirtualBox kernel modules [ OK ]
* Recompiling VirtualBox kernel modules
* Look at /var/log/vbox-install.log to find out what went wrong
/var/log/vbox-install.log中的内容:
Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again。
看来是需要重新编译VirtualBox kernel modules,系统内却没有需要的内核源文件。
运行 sudo apt-get install linux-headers-$(uname -r) 安装内核头文件,再次sudo /etc/init.d/vboxdrv setup,成功。