0

I was using Ubuntu 14.10 on my setup and I had Virtualbox running fine.

Then my OCZ Vertex 2 (SSD) died unexpectedly and I had to reinstall everything.

But, because the Intel Graphics Drivers weren't installing on Ubuntu 14.10 (February 2015), I chose to install Ubuntu 14.04 LTS. What a surprise that the new April 2015 drivers will ONLY install on Ubuntu 14.10! So I then upgraded to Ubuntu 14.10 and, after installing the drivers I updated to 15.04.

Why I did this introduction? Because maybe something wrong happened during the update, especially with the kernel update.

When I install Virtualbox I get this error:

Trying to register the VirtualBox kernel modules using DKMS.

Error! Your kernel headers for kernel 3.19.7-031907-generic cannot be found.

Please install the linux-headers-3.19.7-031907-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
 ...failed!
  (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!

Before, the kernel was like 3.16, I manually updated to 3.19.7, but it can't find kernel headers: what can I do?

Maythux
  • 87,123

1 Answers1

1

you need to install the headers first:

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

you have to recompile the kernel module and install it by

sudo /etc/init.d/vboxdrv setup

If some error appears then try this solution:

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

Maythux
  • 87,123