When I try to run Oracle VM VirtualBox, it says that I need to add a kernel module and recompile the Linux kernel for it to work.

The error I get is:

WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel or it failed to load. Please recompile the kernel module and install it by

sudo /etc/init.d/vboxdrv setup

I downloaded Oracle VM VirtualBox from their download site and selected the deb package for Ubuntu 13.04 AMD64

How would I do that?

  • Please share the method you are trying to use to install the package, and the precise error log.
    – Ernir
    Aug 7, 2013 at 14:50
  • @Ernir I edited the question to include the error and how I installed the package Aug 7, 2013 at 15:01
  • Um...what's the output of sudo /etc/init.d/vboxdrv setup? I think you'll need to install some headers. What's the output of uname -r?
    – Alaa Ali
    Aug 7, 2013 at 15:05
  • @Alaa When I run sudo /etc/init.d/vboxdrv setup it complains that it cannot find the kernel source Aug 7, 2013 at 15:06
  • Please include the command's output in the question.
    – Alaa Ali
    Aug 7, 2013 at 15:07

2 Answers 2


Make sure you have linux kernel headers and build essentials installed:

sudo apt-get install --reinstall linux-headers-generic linux-headers-$(uname -r) build-essential dkms

Then run:

sudo /etc/init.d/vboxdrv setup

watch for errors.


You need the dkms package to install VirtualBox, and the linux-kernel-headers package for your kernel. If those are present, Oracle VM Virtual Box should be able to be installed without issue.


$sudo dpkg -i virtualbox-4.2_4.2.16-86992~Ubuntu~precise_amd64.deb

That should tell you what is recommended/required to complete the install on your machine.

Hope that helps. Have a nice day!

  • 1
    While Wild Man answer is the one that will solve your problem, I also upvoted this as it can prevent it in the future, when you update your kernel. Aug 7, 2013 at 16:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .