A (Virtual) Box of Surprises

When installing VirtualBox 3.2 on a virgin 32-bit Fedora 13 box installed from the LiveCD, I’ve got this cryptic message:

Compilation of the kernel module FAILED! VirtualBox will not start until this
problem is fixed. Please consult /var/log/vbox-install.log to find out why the
kernel module does not compile. Most probably the kernel sources are not found.
Install them and execute

/etc/init.d/vboxdrv setup

as root.

I’ve installed everything possibly needed to compile a kernel and tried the suggested command…

su

yum install binutils dkms gcc glibc-devel glibc-headers kernel-headers kernel-devel libgomp make patch

/etc/init.d/vboxdrv setup

…but I’ve still got the same damn message. Digging the log, I’ve found that the problem was that the sources were missing:

Error! Your kernel source for kernel 2.6.33.3-85.fc13.i686 cannot be found at
/lib/modules/2.6.33.3-85.fc13.i686/build or /lib/modules/2.6.33.3-85.fc13.i686/source.
You can use the –kernelsourcedir option to tell DKMS where it’s located.
Failed to install using DKMS, attempting to install without
Makefile:159: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.ย  Stop.

This was utterly strange, since I had installed kernel-devel. After a lot o fiddling, I’ve found out the problem. Installing the module will fetch the latest version, which is not necessarily the same as the running one:

# uname -r
2.6.33.3-85.fc13.i686

# yum install kernel-devel
Loaded plugins: presto, refresh-packagekit
Setting up Install Process
Package kernel-devel-2.6.34.7-56.fc13.i686 already installed and latest version
Nothing to do

So, you have to be explicit on the version. When I’ve tried this sequence…

yum install kernel-devel-2.6.33.3-85.fc13.i686

/etc/init.d/vboxdrv setup

…it worked like a charm !

All in all, the old saying remains true: UNIX is user friendly, but very selective about who it’s friends are.

8 thoughts on “A (Virtual) Box of Surprises

    • I probably know as much as you do or even less (I am far from a Linux specialist !), but I believe that you can upgrade your kernel-devel after concluding everything, without harm. I also believe that you can have both versions at the same time (I don’t know how to do it, though). If you try it and it works, let me know.๐Ÿ™‚

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s