CentOS 6.2: VirtualBox Guest Additions -> Error: unable to find the sources ...

Issues related to applications and software problems
tigalch
QA Team
Posts: 522
Joined: 2012/06/23 17:28:41
Location: Austria

Re: CentOS 6.2: VirtualBox Guest Additions -> Error: unable

Post by tigalch » 2014/02/26 19:25:04

The above mentioned error with building the openGL module is solved with the release of vBox 4.3.8

ngcat
Posts: 3
Joined: 2014/04/08 13:36:32
Contact:

Re: CentOS 6.2: VirtualBox Guest Additions -> Error: unable

Post by ngcat » 2014/08/28 07:38:27

horsebeef wrote:Is it too late to contribute to this thread? I found that gcc and kernel-devel was not included with the generic desktop install so also needed to do

Code: Select all

yum install -y gcc kernel-devel
after running the updates and rebooting.
FYI this also workes on a Centos 7.0 system.

rfay
Posts: 1
Joined: 2014/12/04 15:26:07

Re: CentOS 6.2: VirtualBox Guest Additions -> Error: unable

Post by rfay » 2014/12/04 15:27:55

One more thing for Centos 6.6: I had to install perl before it would work.

yum install perl

sirahngelu
Posts: 1
Joined: 2015/02/28 04:41:28

Re: CentOS 6.2: VirtualBox Guest Additions -> Error: unable

Post by sirahngelu » 2015/02/28 04:56:34

horsebeef wrote:Is it too late to contribute to this thread? I found that gcc and kernel-devel was not included with the generic desktop install so also needed to do

Code: Select all

yum install -y gcc kernel-devel
after running the updates and rebooting.
I've done that, still error.
so I check the error message:

Code: Select all

# tail /var/log/vbox-install.log
Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
I check the KERN_DIR value:
# echo $KERN_DIR
it's empty,

so I find the value with:
rpm -ql kernel-devel-2.6.32-431.29.2.el6.i686

Code: Select all

.
.
.
/usr/src/kernels/2.6.32-431.29.2.el6.i686/tools/virtio
/usr/src/kernels/2.6.32-431.29.2.el6.i686/tools/virtio/virtio-trace
/usr/src/kernels/2.6.32-431.29.2.el6.i686/tools/virtio/virtio-trace/Makefile
/usr/src/kernels/2.6.32-431.29.2.el6.i686/usr
/usr/src/kernels/2.6.32-431.29.2.el6.i686/usr/Kconfig
/usr/src/kernels/2.6.32-431.29.2.el6.i686/usr/Makefile
/usr/src/kernels/2.6.32-431.29.2.el6.i686/virt
.
.
.
Then set KERN_DIR value:

Code: Select all

export KERN_DIR=/usr/src/kernels/2.6.32-431.29.2.el6.i686
Then

Code: Select all

/etc/init.d/vboxdrv setup
return OK

HTH
sirahngelu banget

nkreadlykimi
Posts: 1
Joined: 2016/12/04 15:46:33

Re: CentOS 6.2: VirtualBox Guest Additions -> Error: unable to find the sources ...

Post by nkreadlykimi » 2016/12/04 15:51:23

Running yum install -y gcc kernel-devel on my centos7 worked. Thank you so much!

Locked