Ubuntu 升级VisualBox后无法启动 Kernel driver not installed (rc=-1908)

转自:http://www.cnblogs.com/WormCanFly/archive/2012/05/23/2514338.html


VisualBox之所以在Linux上比传统的VMware快得多,关键一点就是它和Linux内核的结合比较紧密,这也是开源的优点。

不过Linux内核更新很频繁,每次更新内核后启动VirtualBox都会提示

VirtualBoxkernel driver not installed. The vboxdrv kernel module was either notloaded or /dev/vboxdrv was not created for some reason. Re-setup thekernel module by executing ‘/etc/init.d/vboxdrv setup’ as root.

所以需要重新编译VirtualBox的内核,Ubuntu下执行如下命令:

sudo /etc/init.d/vboxdrv setup

如果提示:

*Stopping VirtualBox kernel modules [ OK ]

*Uninstalling old VirtualBox DKMS kernel modules [OK ]

*Trying to register the VirtualBox kernel modules using DKMS

*Failed, trying without DKMS

*Recompiling VirtualBox kernel modules

*Look at /var/log/vbox-install.log to find out what went wrong


找到 /var/log/vbox-install.log 文件,内容大致为:

Makefile:172:*** Error:unable to find the sources of yourcurrent Linux kernel. Specify KERN_DIR=<directory> andrun Make again. Stop.


所以需要安装当前Linux内核的源文件,编译VirtualBox内核的时候需要它,Ubuntu下执行如下命令安装当前Linux内核的源文件:

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

注意:括起uname-r的不是单引号,而是Esc键下面的那个符号。


然后再编译VirtualBox内核执行如下命令:

sudo /etc/init.d/vboxdrv setup


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值