Page 1 of 2

Problem installing virtualBox guest additions

Posted: 2014/02/25 22:58:47
by pingpong
I tried to install VirtualBox Guest Additions, but got error, below:

Code: Select all

Building the main Guest Additions module                   [FAILED]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
/var/log/vboxadd-install.log

Code: Select all

/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
I am new to Linux, What should I do to fix this? Thanks in advance.

Re: Problem installing virtualBox guest additions KERN_DIR=<

Posted: 2014/02/26 01:32:16
by toracat
Please show us the output from:

rpm -qa kernel\* | sort

and

uname -r

Re: Problem installing virtualBox guest additions KERN_DIR=<

Posted: 2014/02/26 01:36:21
by pingpong
toracat wrote:Please show us the output from:

rpm -qa kernel\* | sort

and

uname -r
Please it below:

Code: Select all

[root@localhost ~]# rpm -qa kernel\* | sort
kernel-2.6.32-431.el6.x86_64
kernel-firmware-2.6.32-431.el6.noarch
[root@localhost ~]# uname -r
2.6.32-431.el6.x86_64
[root@localhost ~]# 

Re: Problem installing virtualBox guest additions KERN_DIR=<

Posted: 2014/02/26 01:41:06
by toracat
You need kernel-devel and kernel-headers whose version matches your kernel (in your case 2.6.32-431.el6).

Re: Problem installing virtualBox guest additions KERN_DIR=<

Posted: 2014/02/26 01:54:16
by pingpong
toracat wrote:You need kernel-devel and kernel-headers whose version matches your kernel (in your case 2.6.32-431.el6).
I am new to Linux. Can you shown me the commands on how to install them?

Re: Problem installing virtualBox guest additions KERN_DIR=<

Posted: 2014/02/26 01:56:47
by gerald_clark
yum update
yum install kernel-headers kernel-devel

Then reboot.

Re: Problem installing virtualBox guest additions KERN_DIR=<

Posted: 2014/02/26 02:33:55
by pingpong
gerald_clark wrote:yum update
yum install kernel-headers kernel-devel

Then reboot.
I followed the steps. After it reboots, it stuck on booting. Please see the screenshot attached.

It frozen at the final step of yum update. I ctl-z the process.
CentOS64.png
CentOS64.png (8.15 KiB) Viewed 63294 times
Another thing is that the OS is 6.5, but it downloaded and installed many other non-system packages in the process, like Python.

Re: Problem installing virtualBox guest additions KERN_DIR=<

Posted: 2014/02/26 02:39:23
by TrevorH
Boot the older kernel by hitting Esc when you see the grub "Booting CentOS x.x.x in X seconds" prompt and scroll down to the older kernel and press 'b' to boot.

Once it reboots, check that you still have freespace in /boot by runnint `df -m /boot`. If it is not 100% or close to that full then run `yum reinstall kernel-2.6.32-431.5.1.el6.x86_64` and check the date/time/size of the file /boot/initramfs-2.6.32-431.5.1.el6.x86_64.img before and after the reinstall. Hopefully this is a transient error with building the initramfs file and the sizes will be quite different and a second reboot will get you up and running.

Re: Problem installing virtualBox guest additions KERN_DIR=<

Posted: 2014/02/26 12:59:41
by pingpong
I tried to re-install VirtaulBox Guest Additions again, and I have different error message.

Code: Select all

Starting the VirtualBox Guest Additions [60G[[0;31mFAILED[0;39m]
(modprobe vboxguest failed)
Starting VirtualBox Guest Addition service VirtualBox Additions module not loaded!
What should I do to fix this?

Thanks in advance.

Re: Problem installing virtualBox guest additions

Posted: 2014/08/29 09:50:46
by janevntt
I use Centos-6.5-x 86_64-live CD setup on Virtualbox 4.3.10.93012 . after I setup comple OS, I often update kernel then i just can install virtualbox guest additions . now if I don't want this error then which do install version OS ? pls help me .
My computer is WIndows 8 and use virtualbox setup centos .