运行虚拟机提示:
1 |
The virtual machine 'XXX' has terminated unexpectedly during startup with exit code 1. |
之后提示:
1 2 3 4 5 6 7 |
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 '/etc/init.d/vboxdrv setup' as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary. |
在终端下运行:
1 |
sudo /etc/init.d/vboxdrv setup |
提示信息
1 2 3 |
Stopping VirtualBox kernel modules [ OK ] * Recompiling VirtualBox kernel modules * Look at /var/log/vbox-install.log to find out what went wrong |
提示有错误,查看了一下错误日志
1 |
cat /var/log/vbox-install.log |
内容如下
1 |
Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again。 停止。 |
根据提示应该是没有找到对应的源文件,查看了一下系统版本号:
1 |
uname -r |
在进入/usr/src里发现果然没有对应的版本号头文件。
解决方法:
1 2 |
sudo apt-get install dkms build-essential linux-headers-generic sudo /etc/init.d/vboxdrv setup |