#5670 closed defect (worksforme)
Virtualbox 3.1 fails to compile on linux kernel 2.6.32
Reported by: | Benjamin Humphrey | Owned by: | |
---|---|---|---|
Component: | installer | Version: | VirtualBox 3.1.0 |
Keywords: | Cc: | ||
Guest type: | Windows | Host type: | Linux |
Description
The kernel module will not compile using the .32 kernel. It cites that it cannot locate the kernel image/headers.
benjamin@benjamin-laptop:~$ sudo /etc/init.d/vboxdrv setup [sudo] password for benjamin: * Stopping VirtualBox kernel module * done. * Recompiling VirtualBox kernel module * Look at /var/log/vbox-install.log to find out what went wrong
benjamin@benjamin-laptop:~$ uname -r 2.6.32-020632-generic
VBOX-INSTALL.LOG:
Attempting to install using DKMS
removing old DKMS module vboxdrv version 3.1.0
Deleting module version: 3.1.0 completely from the DKMS tree.
Done.
Creating symlink /var/lib/dkms/vboxdrv/3.1.0/source ->
/usr/src/vboxdrv-3.1.0
DKMS: add Completed.
Error! Your kernel source for kernel 2.6.32-020632-generic cannot be found at /lib/modules/2.6.32-020632-generic/build or /lib/modules/2.6.32-020632-generic/source. You can use the --kernelsourcedir option to tell DKMS where it's located. Failed to install using DKMS, attempting to install without Makefile:152: * Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
Operating System: Ubuntu Karmic Koala 9.10 Architecture: 64 bit
Change History (10)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Yeah I did, but where do I specify KERN_DIR=<directory>?
Is it added to the end of the module setup command?
comment:3 by , 15 years ago
No, you have to make sure that the directory /lib/modules/$(uname -r)/build points to the build directory of your kernel. During make modules_install this link is generated automatically, don't create it manually.
comment:4 by , 15 years ago
Sorry I don't follow, I don't have a 'build' file or folder in that directory for my 2.6.32 kernel.
comment:5 by , 15 years ago
Ok, then step by step: What did you do to compile and install your kernel?
comment:6 by , 15 years ago
Nothing, I didn't compile it myself. I downloaded and install the following two deb packages from here: http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.32/
linux-headers-2.6.32-020632_2.6.32-020632_all.deb linux-image-2.6.32-020632-generic_2.6.32-020632_amd64.deb
Appreciate the help.
comment:7 by , 15 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
You have to install the package linux-headers-2.6.32-020632_2.6.32-020632_all.deb as well. After that, recompile the kernel module by /etc/init.d/vboxdrv setup.
comment:8 by , 15 years ago
I did install the linux headers all package, re-read my previous post. I also installed the linux source package (the one that's like 60mb) because I read elsewhere that this fixed the problem - didn't do anything. And yes, I've rebooted.
comment:10 by , 15 years ago
Holy Crap that actually fixed it. I've been going weeks without Virtualbox and to think that the fix was just to install that other .deb package all along.... sigh.
Thanks a lot, appreciate your help :)
Cheers
Did you actually have a look at the error message?