[Solved] Can't install Guest Additions CentOS 5

Discussions about using Linux guests in VirtualBox.
Post Reply
GDLTD
Posts: 10
Joined: 11. Jul 2012, 19:45

[Solved] Can't install Guest Additions CentOS 5

Post by GDLTD »

VirtualBox 4.2.12, Mac OS X 10.8.4 host (OE Mac), CentOS release 5.3 (Final)

I've followed the instructions here http://www.virtualbox.org/manual/ch04.html#idp19275392 but can't get the additions installed. The specific error I'm getting is:
The headers for the current running kernel were not found. If 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.18-128.e15
Building the main Guest Additions module fails.

uname -r shows kernel-devel-2.6.18-128.e15
uname -m shows x86_64

/var/log/vboxadd-install.log shows:
DKMS: add Completed.
Error! Your kernel headers for kernel-devel-2.6.18-128.e15 cannot be found at /lib/modules/2.6.18-128.e15/build or /lib/modules/2.6.18-128.e15/source.
You can use the --kernelsourcedir option to tell DKMS where it's located.
Failed to install using DKMS, attempting to install without
[...]

I've checked and both 2.6.18-128.e15/build and 2.6.18-128.e15/source are there. I found this viewtopic.php?f=3&t=39975 which is very similar. I tried
  • Code: Select all

    yum update -y
  • Code: Select all

    yum install dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel
  • --nox11 switch
  • Used

    Code: Select all

    yum reposlit
    to verify all repos are enabled
Still, no matter what I try, I always get the same error.

Any ideas? Thanks.
Last edited by GDLTD on 2. Jul 2013, 19:30, edited 1 time in total.
GDLTD
Posts: 10
Joined: 11. Jul 2012, 19:45

Re: Can't install Guest Additions CentOS 5

Post by GDLTD »

Still trying to get this working. It would appear that the symlinks are broken in /lib/modules/2.6.18-128.e15/build and /lib/modules/2.6.18-128.e15/source I tried repairing the symlinks - are they supposed to point at `/usr/src/kernels` ? What's odd there is the kernel is actually 2.6.18-194.26.1.e15.centos.plus x86_64

I've tried

Code: Select all

export KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m`
but it doesn't seem to work.

I've tried removing the kernel source and header and reinstalling them, but it hasn't helped.

Suggestions?

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: Can't install Guest Additions CentOS 5

Post by Perryg »

What does the following report?

Code: Select all

yum install kernel-devel-$(uname -r)
GDLTD
Posts: 10
Joined: 11. Jul 2012, 19:45

Re: Can't install Guest Additions CentOS 5

Post by GDLTD »

No package kernel-devel-2.6.18-128.e15 available.
Nothing to do
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't install Guest Additions CentOS 5

Post by Perryg »

There's your problem. The devel package that match your running kernel are no longer available. You will need to find them in an archive or update your kernel to a place where you have matching headers & devel packages.
GDLTD
Posts: 10
Joined: 11. Jul 2012, 19:45

Re: Can't install Guest Additions CentOS 5

Post by GDLTD »

Thanks for that. At least then when I escalated the issue I had something more solid to go on. Then kernel was upgraded and now guest additions have successfully installed.
Post Reply