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
I’ve installed everything possibly needed to compile a kernel and tried the suggested command…
yum install binutils dkms gcc
…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 126.96.36.199-85.fc13.i686 cannot be found at
/lib/modules/188.8.131.52-85.fc13.i686/build or /lib/modules/184.108.40.206-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
# yum install kernel-devel
Loaded plugins: presto, refresh-packagekit
Setting up Install Process
Package kernel-devel-220.127.116.11-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-18.104.22.168-85.fc13.i686
…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.