2

I am using Ubuntu, and I am trying to install virtualbox. But I get this error. If anyone knows how to solve this, please, tell me.

Error:
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (2.6.32-042stab092.2) or it failed to
load. Please recompile the kernel module and install it by

   sudo /etc/init.d/vboxdrv setup

You will not be able to start VMs until this problem is fixed.

*Edit: After ThomasW's answer this showed up:

ERROR ON LOG: Error log file:
Uninstalling modules from DKMS
Attempting to install using DKMS
Failed to install using DKMS, attempting to install without
Makefile:183: *** Error: unable to find the sources of your current Linux kernel.
Specify KERN_DIR=<directory> and run Make again. Stop
Thomas Ward
  • 78,878
Joserex65
  • 221

3 Answers3

1

You need to run the command that is being provided in the error, as well as recompile it.

First, start by installing build-essential to get the essential libraries for building things:

sudo apt-get install build-essential

Next, run the command that error is specifying:

sudo /etc/init.d/vboxdrv setup
Thomas Ward
  • 78,878
0

First, start off by following Thomas W.'s answer:

sudo apt-get install build-essential

followed by

sudo /etc/init.d/vboxdrv setup 

To fix your error, run:

sudo apt-get install linux-generic linux-headers-generic
Kaz Wolfe
  • 34,680
0

What did work for me :

sudo apt-get install linux-headers-amd64 

replace amd64 by your architecture.