Page 1 of 1

[Solved] Can't install Guest Additions CentOS 5

Posted: 17. Jun 2013, 20:45
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.

Re: Can't install Guest Additions CentOS 5

Posted: 25. Jun 2013, 20:09
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.

Re: Can't install Guest Additions CentOS 5

Posted: 25. Jun 2013, 20:49
by Perryg
What does the following report?

Code: Select all

yum install kernel-devel-$(uname -r)

Re: Can't install Guest Additions CentOS 5

Posted: 27. Jun 2013, 00:48
by GDLTD
No package kernel-devel-2.6.18-128.e15 available.
Nothing to do

Re: Can't install Guest Additions CentOS 5

Posted: 27. Jun 2013, 00:52
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.

Re: Can't install Guest Additions CentOS 5

Posted: 2. Jul 2013, 19:30
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.