2007年10月02日 Tuesday , 2,558 次点击

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

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

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

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

sudo /etc/init.d/vboxdrv setup

如果提示

Stopping VirtualBox kernel module: vboxdrv.
Recompiling VirtualBox kernel module: vboxdrv
* Look at /var/log/vbox-install.log to find out what went wrong

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

Makefile:73: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=〈directory〉 and run Make again.

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

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

注意括起uname -r的不是单引号,而是Esc键下面的那个符号。
然后再编译VirtualBox内核就行了。

Tags :

随机日志

來留言吧!


Please copy the string wS1wyj to the field below:

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

尚未有留言

尚未有留言

留言板RSS 引用 URI

來留言吧!

«
»