1. 当前位置:网站首页 > Ubuntu相关

运行vbox虚拟机编译出现错误的问题


运行虚拟机提示:

The virtual machine 'debian' has terminated unexpectedly during startup with exit code 1.

之后提示:

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.

在终端下运行:

    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里发现果然没有对应的版本号头文件。

解决方法:

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


本文最后更新于2013-3-25,已超过 3个月没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!
版权说明

本文地址:https://www.chensj.net/?post=19
未标注转载均为本站远程,转载请注明文章出处:

联系我们

在线咨询:点击这里给我发消息

微信号:chensj923

工作日:9:00-23:00,节假日休息

扫码关注