在几台PC上安装了 Asianux3sp3 x86_64 系统,并安装了 vmware server 1.0 ,做为一些 vmware 虚拟机服务器,上面有很多不同版本的虚拟系统,以供不时之需。

但最近想在 fedora15 上也安装一个虚拟机,不想使用 vmware 了,打算试试 VirtualBox ,于是下载了 VirtualBox-4.1-4.1.2_73507_fedora15-1.i686.rpm 包,但在安装时,出现以下问题:
[php]
[root@edward tmp]# rpm -ivh VirtualBox-4.1-4.1.2_73507_fedora15-1.i686.rpm
warning: VirtualBox-4.1-4.1.2_73507_fedora15-1.i686.rpm: Header V4 DSA/SHA1 Signature, key ID 98ab5139: NOKEY
Preparing… ########################################### [100%]
1:VirtualBox-4.1 ########################################### [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.

Stopping VirtualBox kernel modules [确定]
Uninstalling old VirtualBox DKMS kernel modules [确定]
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)
[root@edward tmp]# cat /var/log/vbox-install.log
Makefile:172: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again。 停止。
[/php]

解决方法:

1、卸载已经安装的 VirtualBox 包:
[php]
rpm -e `rpm -qa |grep VirtualBox`
[/php]

2、安装 DKMS :
[php]
[root@edward tmp]# yum -y install dkms
[/php]

3、再次安装 VirtualBox 包:
[php]
[root@edward tmp]# rpm -ivh VirtualBox-4.1-4.1.2_73507_fedora15-1.i686.rpm
warning: VirtualBox-4.1-4.1.2_73507_fedora15-1.i686.rpm: Header V4 DSA/SHA1 Signature, key ID 98ab5139: NOKEY
Preparing… ########################################### [100%]
1:VirtualBox-4.1 ########################################### [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.

Stopping VirtualBox kernel modules [确定]
Uninstalling old VirtualBox DKMS kernel modules [确定]
Trying to register the VirtualBox kernel modules using DKMS
[确定]
Starting VirtualBox kernel modules [确定]
[/php]

4、启动 VirtualBox 虚拟机:
在终端上执行 virtualbox 命令,或者在桌面创建一个快捷方式。
可以正常使用。