VirtualBox

Ticket #5670 (closed defect: worksforme)

Opened 4 years ago

Last modified 4 years ago

Virtualbox 3.1 fails to compile on linux kernel 2.6.32

Reported by: humphreybc Owned by:
Priority: major 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

comment:1 Changed 4 years ago by frank

Did you actually have a look at the error message?

comment:2 Changed 4 years ago by humphreybc

Yeah I did, but where do I specify KERN_DIR=<directory>?

Is it added to the end of the module setup command?

comment:3 Changed 4 years ago by frank

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 Changed 4 years ago by humphreybc

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 Changed 4 years ago by frank

Ok, then step by step: What did you do to compile and install your kernel?

comment:6 Changed 4 years ago by humphreybc

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 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to worksforme

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 Changed 4 years ago by humphreybc

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:9 Changed 4 years ago by frank

Typo: Install the other -amd64-headers package.

comment:10 Changed 4 years ago by humphreybc

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

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use