I have previously used VirtualBox on my Ubuntu 14.10 machine, but I had not used it in the last two months.
When I tried to start a VM, I got the following error:
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-dkms package and the appropriate
headers, most likely linux-headers-generic.
You will not be able to start VMs until this problem is fixed.
I found several other questions which say to run sudo dpkg-reconfigure virtualbox-dkms
or to uninstall and reinstall virtualbox.
When I run any of these commands, I get the following message:
------------------------------
Deleting module version: 4.3.18
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-4.3.18 DKMS files...
Building only for 3.13.0-29-generic
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
* Stopping VirtualBox kernel modules [ OK ]
* Starting VirtualBox kernel modules
* No suitable module for running kernel found
[fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.
When I run uname -a
, I see that the running Kernel version is 3.13.0-29-generic
, as the message above says.
However, when I check which Kernel headers are installed, I see these:
linux-headers-3.16.0-24 - Header files related to Linux kernel version 3.16.0
linux-headers-3.16.0-24-generic - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-24-lowlatency - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-25 - Header files related to Linux kernel version 3.16.0
linux-headers-3.16.0-25-generic - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-25-lowlatency - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-26 - Header files related to Linux kernel version 3.16.0
linux-headers-3.16.0-26-generic - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-26-lowlatency - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-28 - Header files related to Linux kernel version 3.16.0
linux-headers-3.16.0-28-generic - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-28-lowlatency - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-29 - Header files related to Linux kernel version 3.16.0
linux-headers-3.16.0-29-generic - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-29-lowlatency - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-30 - Header files related to Linux kernel version 3.16.0
linux-headers-3.16.0-30-generic - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-30-lowlatency - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-31 - Header files related to Linux kernel version 3.16.0
linux-headers-3.16.0-31-generic - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-31-lowlatency - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
I tried to install the 3.13.0-29
headers using sudo apt-get install linux-headers-`uname -r`
and got this error:
Package linux-headers-3.13.0-29-generic is not available...
I tried running sudo apt-get dist-upgrade
to upgrade the Kernel to 3.16...
, but it doesn't seem to do anything.
How can I either update the installed kernel to match the headers that are available or get the old headers?
I figured this out after finding https://unix.stackexchange.com/questions/170580/package-linux-headers-3-13-0-27-generic-has-no-installation-candidate and noticing that 14.10 should have shipped with the
3.16
kernel from the start.This machine was upgraded from 14.04 to 14.10 using
do-release-upgrade
. However, the3.13.x
kernel from 14.04 was installed explicitly instead of through thelinux-image-generic
meta-package, so it didn't get upgraded. However, the headers were installed using the-generic
meta-package, so they did get updated.Installing
linux-generic
caused the Kernel and Headers to both update to the newest3.16.x
.