Virtual Box Installation Error

When i try to install virtual box 10.3 i get the following error

Makefile:154: *** Error: unable to find the include directory for your current Linux kernel. Specify KERN_INCL=<directory> and run Make again. Stop.

I am using VirtualBox-1.6.2_31466_openSUSE103-1.i586.rpm.

Does anyone have any ideas on how to resolve this error, and complete the installation.

You need to install the kernel-sources package. You also need gcc if you haven’t got it already.

I have already installed Kernel source…

I have also installed the complet base development package, that includes gcc

Try installing linux-kernel-headers also.

checked it is already installed

Does your kernel-source match the running kernel in version? Especially after the last kernel update.

How do i check this.

Press Alt and F2

Type
konsole
and press ENTER

Type
uname -r
and press ENTER

You will see something like this
2.6.25.9-0.2-default

Note the word default. I have had issues with the pae kernel and virtualbox. If you do not have the default kernel, install through yast

kernel-default
kernel-syms
linux-kernel-headers
virtualbox-ose-kmp-default
Xalan-c
Xerces-c

Then when booting remember to select the kernel-default entry and boot.
Now try to install and run Virtualbox

i had the same error becaues i updated kernel-sources from the online repository but still had an older kernel from my installation DVD. I solved the problem by updating the kernel from the online repository as well. As i’ve read, the version Numbers of kernel and sources can differ, but they have to be issued on the same day.

Ooh I didn’t know that. I’ve always kept kernel-source and kernel with the same version numbers because virtualbox and other packages that require kernel-source have steadfastly refused to compile if there was even a -x.x.x.1 difference between the two. I’ll check for issue days next time KOTD has a version mismatch.

@OP

You can check kernel versions in yast. In the software manager, select a package, and click on the Version tab. It’ll have a check mark on the installed version and also list all available versions.

Thanks this sorted the porblem…