Page 1 of 1

Can not install VBoxGuestAdditions.iso, please help!

Posted: 19. Apr 2009, 00:23
by turbowei
hi. The version I am using is 2.1.4. The host OS is vista, the guest OS is CentOS 5.3.

I got this error

[root@localhost ~]# ./VBoxLinuxAdditions-x86.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 2.1.4 Guest Additions for Linux
installation...........................................................................................................................................................................................................
VirtualBox 2.1.4 Guest Additions installation
Please install the build and header files for your current Linux kernel.
The current kernel version is 2.6.18-128.el5
Problems were found which would prevent the Guest Additions from installing.
Please correct these problems and try again.

I already installed kernel-header and gcc. (I used yum install gcc, because the default CentOS with desktop w/ GNOME doesn't have compiler and other various dev packages installed) And I even reboot the machine. But I still get the error message.

Please help.

Thanks!

Re: Can not install VBoxGuestAdditions.iso, please help!

Posted: 19. Apr 2009, 00:26
by Sasquatch
I made a howto just for this. It's in the Linux Guests. And it clearly states that you have to make sure that everything you install for your kernel, so the kernel you boot, the headers and if you want, it's source, be of the EXACT SAME version and build. If you fail that criteria, the GA install will fail.

Re: Can not install VBoxGuestAdditions.iso, please help!

Posted: 19. Apr 2009, 01:02
by turbowei
Sasquatch wrote:I made a howto just for this. It's in the Linux Guests. And it clearly states that you have to make sure that everything you install for your kernel, so the kernel you boot, the headers and if you want, it's source, be of the EXACT SAME version and build. If you fail that criteria, the GA install will fail.
Yes, they are both 2.6.128.el5.

[root@localhost ~]# rpm -qa | grep kernel
kernel-headers-2.6.18-128.1.6.el5
kernel-2.6.18-128.el5

does the ".1.6" matter in kernel-headers package?

Re: Can not install VBoxGuestAdditions.iso, please help!

Posted: 19. Apr 2009, 01:17
by turbowei
hmm, after doing some dissection of the installation script, the problem is from I don't have either directory installed:

Could not find the Linux kernel header files - the directories
/lib/modules/2.6.18-128.el5/build/include and /usr/src/linux/include
do not exist.

Update: And yum provides /usr/src/linux/include/* returns nothing.

It seems like all kernel source is installed in /usr/src/kernels/2.6.128-1.6.el5/. not the /usr/src/linux that vbox looks for.

What files would be in /lib/modules/2.6.18-128.el5/build/include directory?

Re: Can not install VBoxGuestAdditions.iso, please help!

Posted: 19. Apr 2009, 01:37
by Perryg
Yes it does.
The kernel and the headers must match.

Here this might help you.
http://forums.virtualbox.org/viewtopic.php?t=4960

By the way all I did was type guest additions in centos in google.com

Re: Can not install VBoxGuestAdditions.iso, please help!

Posted: 19. Apr 2009, 02:08
by turbowei
yum install kernel sources
yum install kernel-devel
yum install gcc
ln -s /usr/src/kernels/2.6.18-92.1.18.el5-i686 /usr/src/linux
sh VBoxLinuxAdditions-x86.run

does the trick.

The error message in /var/log/vboxadd.log is a bit misleading.

Re: Can not install VBoxGuestAdditions.iso, please help!

Posted: 19. Apr 2009, 02:15
by Perryg
I knew you could do it.

Just rememebr that Google is your friend.

Here is another tip for you if you want to search the forums here. Type you question in google and put site:forums.virtualbox.org after it.
Example: guest additions in centos site:forums.virtualbox.org