Problem installing virtualBox guest additions

Issues related to applications and software problems
pingpong
Posts: 17
Joined: 2012/09/23 15:26:59

Problem installing virtualBox guest additions

Postby pingpong » 2014/02/25 22:58:47

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.
Last edited by pingpong on 2014/02/26 20:11:32, edited 1 time in total.

User avatar
toracat
Forum Moderator
Posts: 7219
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Problem installing virtualBox guest additions KERN_DIR=<

Postby toracat » 2014/02/26 01:32:16

Please show us the output from:

rpm -qa kernel\* | sort

and

uname -r
CentOS Forum FAQ

pingpong
Posts: 17
Joined: 2012/09/23 15:26:59

Re: Problem installing virtualBox guest additions KERN_DIR=<

Postby pingpong » 2014/02/26 01:36:21

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 ~]#

User avatar
toracat
Forum Moderator
Posts: 7219
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Problem installing virtualBox guest additions KERN_DIR=<

Postby toracat » 2014/02/26 01:41:06

You need kernel-devel and kernel-headers whose version matches your kernel (in your case 2.6.32-431.el6).
CentOS Forum FAQ

pingpong
Posts: 17
Joined: 2012/09/23 15:26:59

Re: Problem installing virtualBox guest additions KERN_DIR=<

Postby pingpong » 2014/02/26 01:54:16

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?
Last edited by pingpong on 2014/02/26 01:56:59, edited 1 time in total.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Problem installing virtualBox guest additions KERN_DIR=<

Postby gerald_clark » 2014/02/26 01:56:47

yum update
yum install kernel-headers kernel-devel

Then reboot.

pingpong
Posts: 17
Joined: 2012/09/23 15:26:59

Re: Problem installing virtualBox guest additions KERN_DIR=<

Postby pingpong » 2014/02/26 02:33:55

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 46718 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.

User avatar
TrevorH
Forum Moderator
Posts: 20562
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problem installing virtualBox guest additions KERN_DIR=<

Postby TrevorH » 2014/02/26 02:39:23

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.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

pingpong
Posts: 17
Joined: 2012/09/23 15:26:59

Re: Problem installing virtualBox guest additions KERN_DIR=<

Postby pingpong » 2014/02/26 12:59:41

I tried to re-install VirtaulBox Guest Additions again, and I have different error message.

Code: Select all

Starting the VirtualBox Guest Additions [FAILED]
(modprobe vboxguest failed)
Starting VirtualBox Guest Addition service VirtualBox Additions module not loaded!


What should I do to fix this?

Thanks in advance.

janevntt
Posts: 1
Joined: 2014/08/29 09:37:32

Re: Problem installing virtualBox guest additions

Postby janevntt » 2014/08/29 09:50:46

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 .