I know there are many open discussions relating this issue, but none of them addresses a unique reason about the bug.
It's about Ubuntu 16.04, in my case. I install VirtualBox from Ubuntu repository, with sudo apt install virtualbox-qt
I had kernel 4.4.0-34-generic installed. After I installed VirtualBox, everything worked fine.
But after I updated the system (through Software Updater) and upgraded with sudo apt upgrade
, sudo apt dist-upgrade
and auto-remove
, my virtual machine can't start. Kernel 4.4.0-36-generic is now installed. It says something like:
please install virtualbox-dkms and check if appropriate linux-headers are installed
virtualbox-dkms
is already installed, so nothing happens after sudo apt install virtualbox-dkms
But what about headers?
$ dpkg -l | grep linux-headers
ii linux-headers-4.4.0-34 4.4.0-34.53 all Header files related to Linux kernel version 4.4.0
ii linux-headers-4.4.0-34-generic 4.4.0-34.53 amd64 Linux kernel headers for version 4.4.0 on 64 bit x86 SMP
ii linux-headers-4.4.0-36 4.4.0-36.55 all Header files related to Linux kernel version 4.4.0
ii linux-headers-4.4.0-36-generic 4.4.0-36.55 amd64 Linux kernel headers for version 4.4.0 on 64 bit x86 SMP
ii linux-headers-generic 4.4.0.36.38 amd64 Generic Linux kernel headers
$ uname -r
4.4.0-36-generic
And what is the real reason why this happens after every kernel update? I want to know exactly what to do and not always to spend days fixing it.
dpkg -l | grep linux-headers
) match the running kernel (uname -r
). Please update your question with the results.