Page 1 of 1

unable to find the sources of your current Linux kernel

Posted: 10. Feb 2010, 22:10
by rodyz
I am not a newbie, but pretty unexperienced concerning linux. I am running a freshly installed RHEL 5.4. The installation of the RPM-package, downloaded 1 h ago, failed partly with the following details:
No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.

Compilation of the kernel module FAILED! VirtualBox will not start until this
problem is fixed. Please consult /var/log/vbox-install.log to find out why the
kernel module does not compile. Most probably the kernel sources are not found.
Install them and execute

/etc/init.d/vboxdrv setup

as root.
The content of the log file is:
** Compiling vboxdrv
Makefile:152: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
Any suggestions what to do very appreciated

TIA Rodyz

Re: unable to find the sources of your current Linux kernel

Posted: 10. Feb 2010, 22:16
by miros84
Try

Code: Select all

/etc/init.d/vboxdrv setup
if that doesnot work, install linux-headers

Re: unable to find the sources of your current Linux kernel

Posted: 10. Feb 2010, 22:20
by miros84
I dont use redhad, but try this:

Code: Select all

yum install kernel-devel
then do that as root

Code: Select all

    /etc/init.d/vboxdrv setup

Re: unable to find the sources of your current Linux kernel

Posted: 11. Feb 2010, 00:23
by rodyz
Solved - thanks miros84

I have installed the kernel for xen, using yum, but that does not automatically install the headers too, as I know now.
In addition I had to add the path to the actual kernel.

After

Code: Select all

/etc/init.d/vboxdrv setup KERN_DIR=/usr/src/kernels/<actual_kernel>
I could create guests.

Re: unable to find the sources of your current Linux kernel

Posted: 11. Feb 2010, 12:24
by rodyz
Ups, forgot to mention. (Maybe interesting for others)

I had also to recompile.

Code: Select all

/usr/src/vboxdrv-<version_number>/make
/usr/src/vboxdrv-<version_number>/make install