Page 1 of 1

Install VBox on Centos - Kernel Header problem

Posted: 11. Nov 2013, 15:13
by leo476
Hi,
i'm trying to install virtual box on my centos 5.2 system. I did the following:
  • updgrade kernel
    install kernel-devel, headers
current version:
  • kernel-2.6.18-371.1.2.el5
    kernel-devel-2.6.18-371.1.2.el5
    kernel-headers-2.6.18-371.1.2.el5
When i'm trying to compile the vb kernel via: "service vboxdrv setup"
I get the following error:
Your kernel headers for kernel 2.6.39.3 cannot be found at
/lib/modules/2.6.39.3/build or /lib/modules/2.6.39.3/source.
Why is VB searchig for that version of the kernel? I took care that i have the same version of kernel header and kernel itself but it is still not possible to compile.

Any ideas?

Thanks

Re: Install VBox on Centos - Kernel Header problem

Posted: 11. Nov 2013, 15:38
by Perryg
What does running uname -r in a terminal return?

Re: Install VBox on Centos - Kernel Header problem

Posted: 11. Nov 2013, 15:41
by leo476
it returns: 2.6.39.3

That's why im confused. I also tried to install header and devel source for this version but it seems that there is no package available.

Re: Install VBox on Centos - Kernel Header problem

Posted: 11. Nov 2013, 15:47
by Martin
Did you reboot after the update and made sure to start with the new kernel?

Re: Install VBox on Centos - Kernel Header problem

Posted: 11. Nov 2013, 16:50
by leo476
when i'm trying to reboot, i get a kernel panic...

is it because the new kernel is not compatible to Centos 5.2? (same when i just do a "yum update" the result is a kernel panic and i'm not able to boot the system any longer).

Now i have reinstalled the whole system. The current kernel version is by typing 'uname -r':
2.6.39.3
By typing 'rpm -qa kernel' i get:
kernel-2.6.18-164.10.1.el5
kernel-2.6.18-164.15.1.el5
kernel-2.6.18-164.el5
kernel-2.6.18-164.11.1.el5
kernel-2.6.18-308.1.1.el5
By typing: "rpm -qa kernel |sort |tail -n 1" i'll get: kernel-2.6.18-308.1.1.el5

Can you help me to understand the difference between 'rpm -qa kernel' and 'uname -r'?

If i would update now the kernel via 'yum update kernel' i will get the following kernel version: kernel-2.6.18-371.1.2.el5 by typing in 'rpm -qa kernel'.

And if i would like to install the correct kernel-devel by
"yum install kernel-devel-$(uname -r)"
i'll get the following:
No package kernel-devel-2.6.39.3 available.

Re: Install VBox on Centos - Kernel Header problem

Posted: 11. Nov 2013, 17:09
by Perryg
These questions would be better answered by the CentOS folks.