$ su # yum install kernel-headers kernel-devel gcc # export KERN_DIR=/usr/src/kernels/220.127.116.11-174.fc12.x86_64 # cd /media/VBOXADDITIONS_3.1.2_56127 # ./VBoxLinuxAdditions-amd64.run
This time the kernel modules should compile. Then restart the system.
Update for 32-bit Guests:
A few possible changes if this doesn’t work for you with a 32-bit guest. (It didn’t for me, so I had to play around/research a bit more.)
# uname -rIf you see the letters PAE, then you’ll need to follow the rest of these steps. If you don’t see PAE, you should be fine.
If so, make sure your kernel is up to date with
# yum update kernel-PAE. After this, restart.
Instead of the kernel-devel package, you’ll need to install kernel-PAE-devel. That makes the second line of the example above:
# yum install kernel-headers kernel-PAE-devel gccIf you’d already installed the kernel-devel package, you may want to remove it:
# yum remove kernel-develas it can confuse things.
Then, everything else should be the same.