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, 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?


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

| improve this answer | |
  • it says linux-headers-3.19.7-031907-generic is not available (output not in english, my translation) – Magnetic_dud May 8 '15 at 7:34
  • sudo apt-get install linux-headers-$(uname -r) output opf this command? – Maythux May 8 '15 at 7:35
  • Il pacchetto linux-headers-3.19.7-031907-generic non ha versioni disponibili, ma è nominato da un altro pacchetto. Questo potrebbe indicare che il pacchetto è mancante, obsoleto oppure è disponibile solo all'interno di un'altra sorgente E: Il pacchetto "linux-headers-3.19.7-031907-generic" non ha candidati da installare – Magnetic_dud May 8 '15 at 7:38
  • Write in English please – Maythux May 8 '15 at 7:39
  • what happens if you run this sudo apt-get install virtualbox-ose? – Maythux May 8 '15 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.