Record and Summarize

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

当启动虚拟机后,可能会报错:

 

错误1

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.

 

按照提示,在终端下运行:

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

 

按照提示,查看了一下错误日志

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。 停止。

 

根据提示应该是没有找到对应的源文件,查看了一下系统版本号:

uname -r

在进入/usr/src里发现果然没有对应的版本号头文件。

错误1解决

sudo apt-get install dkms build-essential linux-headers-generic
sudo /etc/init.d/vboxdrv setup

完成。

如果提示仍然提示未发现linux-headers-generic的某一个版本,则按照提示直接安装该版本linux-headers-generic即可。

 

错误2

按照提示,在终端下运行:

sudo /etc/init.d/vboxdrv setup

 运行之后出现错误:

/etc/init.d/vboxdrv doesn't exist

错误2解决

sudo apt-get install linux-headers-`uname -r`

之后,Reconfigure dkms and load module:

sudo dpkg-reconfigure virtualbox-dkms  
sudo modprobe vboxdrv

现在就可以正常启动了。

 

持续补充。。。

posted on 2013-08-23 10:04  zhangjing327  阅读(609)  评论(0编辑  收藏  举报