Unable to Install VirtualBox Due to Missing Kernel Module

Doing everything as root by using su and the yum package manager is something that fits for Redhat-based distros, but not Ubuntu. In Ubuntu, you run command as root by prefixing commands with sudo. The package manager used by Ubuntu is apt.

To install VirtualBox, run:

sudo apt-get install virtualbox-ose

This will take care of dependencies like the kernel headers which is included in the package linux-headers-generic. If you've a PAE kernel, you need to install the headers first (in your case linux-headers-2.6.38-8-generic-pae), which can be done with:

sudo apt-get install linux-headers-$(uname -r)

uname -r gives the loaded kernel version and saved you from manually entering the kernel version.


I was having the same issue. I had the linux-headers-<version>-generic-pae installed but was ironically missing the linux-headers-generic-pae. If you install those that should help maybe.

Good luck!


Install build-essentials.

apt-get install build-essentials 

and install linux-kernel-headers

apt-get install linux-kernel-headers 

or

apt-get install linux-kernel-*

Install dkms

apt-get install dkms