最近,机器(x86_64)安装了FC 10(fedora10),准备安装虚拟机,先是安装VM 6.5,发现VM 6.5在64位下安装很费劲,搞了3天,放弃啦。有人说VM在FC 10下的64位装不了。于是,就转向sun的一个虚拟机软件VirtualBox,我到VirtualBox官网找到fedora9/10对应x86_64的rpm版本,网上看了很多介绍怎么安装的帖子。在机子安装完后,可以打开VBox的界面,但是在加载了iso镜像后,点击开始运行时出现错误“No precompiled module for this kernel found” ,提示查看/var/log/vbox-install.log。
#cat /var/log/vbox-install.log
Attempting to install using DKMS
removing old DKMS module vboxdrv version 2.2.0
------------------------------
Deleting module version: 2.2.0
completely from the DKMS tree.
------------------------------
Done.
Creating symlink /var/lib/dkms/vboxdrv/2.2.0/source ->
/usr/src/vboxdrv-2.2.0
DKMS: add Completed.
Error! Your kernel source for kernel 2.6.27.5-117.fc10.x86_64 cannot be found at
/lib/modules/2.6.27.5-117.fc10.x86_64/build or /lib/modules/2.6.27.5-117.fc10.x86_64/source.
You can use the --kernelsourcedir option to tell DKMS where it's located.
Failed to install using DKMS, attempting to install without
Makefile:140: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
说我的kernel源文件找不到。
Your kernel source for kernel 2.6.27.5-117.fc10.x86_64 cannot be found at
/lib/modules/2.6.27.5-117.fc10.x86_64/build or /lib/modules/2.6.27.5-117.fc10.x86_64/source.
找了半天,终于找到一个帖子,解决了我的Vbox问题。
http://fedoraforum.org/forum/showthread.php?t=221501
发现我的kernel和kernel-devel版本不一致。
#uname -r (或rpm -q kernel)查看kernel版本
#rpm -q kernel-devel 查看 kernel-devel版本
[root@localhost /]# uname -r
2.6.27.5-117.fc10.x86_64
[root@localhost /]# rpm -q kernel
kernel-2.6.27.5-117.fc10.x86_64
[root@localhost /]# rpm -q kernel-devel
kernel-devel-2.6.27.24-170.2.68.fc10.x86_64
我发现不一致,kernel版本低,于是更新一下kernel
[root@localhost /]# yum update kernel
Loaded plugins: aliases, allowdowngrade, changelog, downloadonly, fastestmirror, fedorakmod,
。。。。。。。。。。
Installing:
kernel x86_64 2.6.27.24-170.2.68.fc10 updates 20 M
Updating for dependencies:
kernel-firmware noarch 2.6.27.24-170.2.68.fc10 updates 370 k
。。。。。。。。。。。。
更新完,reboot重启机器。
[root@localhost ant]# uname -r
2.6.27.24-170.2.68.fc10.x86_64
[root@localhost ant]# rpm -q kernel kernel-devel
kernel-2.6.27.5-117.fc10.x86_64
kernel-2.6.27.24-170.2.68.fc10.x86_64
kernel-devel-2.6.27.24-170.2.68.fc10.x86_64
发现一致。
这时要先卸载以前安装的Vbox。
[root@localhost ant]# rpm -q VirtualBox (查看virtualbox)
[root@localhost ant]# rpm -e VirtualBox (卸载virtualbox)
[root@localhost ant]# rpm -ivh VirtualBox-2.2.4_47978_fedora9-10.x86_64.rpm (安装virtualbox)
Preparing... ########################################### [100%]
1:VirtualBox ########################################### [100%]
Creating group 'vboxusers'. VM users must be member of that group!
No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.
Success!
[root@localhost ant]#
再次启动VirtualBox,加载镜像文件,启动成功。
希望对linux装虚拟机有帮助。