unable to find the sources of your current Linux kernel

Discussions related to using VirtualBox on Linux hosts.

unable to find the sources of your current Linux kernel

Postby rodyz » 10. Feb 2010, 22:10

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
rodyz
 
Posts: 13
Joined: 14. Oct 2008, 10:38

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

Postby miros84 » 10. Feb 2010, 22:16

Try
Code: Select all   Expand viewCollapse view
/etc/init.d/vboxdrv setup

if that doesnot work, install linux-headers
miros84
 
Posts: 20
Joined: 29. Jan 2010, 18:45
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: windows

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

Postby miros84 » 10. Feb 2010, 22:20

I dont use redhad, but try this:

Code: Select all   Expand viewCollapse view
yum install kernel-devel

then do that as root

Code: Select all   Expand viewCollapse view
    /etc/init.d/vboxdrv setup
miros84
 
Posts: 20
Joined: 29. Jan 2010, 18:45
Primary OS: Debian Lenny
VBox Version: PUEL
Guest OSses: windows

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

Postby rodyz » 11. Feb 2010, 00:23

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   Expand viewCollapse view
/etc/init.d/vboxdrv setup KERN_DIR=/usr/src/kernels/<actual_kernel>

I could create guests.
rodyz
 
Posts: 13
Joined: 14. Oct 2008, 10:38

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

Postby rodyz » 11. Feb 2010, 12:24

Ups, forgot to mention. (Maybe interesting for others)

I had also to recompile.

Code: Select all   Expand viewCollapse view
/usr/src/vboxdrv-<version_number>/make
/usr/src/vboxdrv-<version_number>/make install
rodyz
 
Posts: 13
Joined: 14. Oct 2008, 10:38


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 14 guests