Install VBox on Centos - Kernel Header problem

Discussions related to using VirtualBox on Linux hosts.
Post Reply
leo476
Posts: 3
Joined: 11. Nov 2013, 15:08

Install VBox on Centos - Kernel Header problem

Post 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
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Install VBox on Centos - Kernel Header problem

Post by Perryg »

What does running uname -r in a terminal return?
leo476
Posts: 3
Joined: 11. Nov 2013, 15:08

Re: Install VBox on Centos - Kernel Header problem

Post 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.
Martin
Volunteer
Posts: 2562
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Install VBox on Centos - Kernel Header problem

Post by Martin »

Did you reboot after the update and made sure to start with the new kernel?
leo476
Posts: 3
Joined: 11. Nov 2013, 15:08

Re: Install VBox on Centos - Kernel Header problem

Post 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.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Install VBox on Centos - Kernel Header problem

Post by Perryg »

These questions would be better answered by the CentOS folks.
Post Reply