Fix Guest Addition installation on CentOS 6.2
I was trying to install Guest Additions on CentOS 6.2. I think the installation step is correct but I still get the following error.The headers for the current running kernel were not found. If the followingThe problem is that my current kernel version does not match with the Virtualbox. If you have this problem, you can solve it by doing the following:
module compilation fails then this could be the reason.
The missing package can be probably installed with
yum install kernel-devel-2.6.32-220.el6.i686
Building the main Guest Additions module [FAILED]
First, check the kernel version
uname -rIt return
2.6.32-220.el6.i686In my case, my CentOS is currently has kernel-headers-2.6.32-279.9.1.el6.i686
So, I need to upgrade my kernel to the version 2.6.32-279.9.1.el6.i686
I use this command instead
yum install kernel-2.6.32-279.9.1.el6.i686
The process will begin
Updating : kernel-firmware-2.6.32-279.9.1.el6.noarchNow, after reboot, Guest Additions is up and running with the current Kernel version
Installing : kernel-2.6.32-279.9.1.el6.i686 2
Cleanup : kernel-firmware-2.6.32-220.el6.noarch