Today I upgraded by 14.10 VM to 15.04. Since it's a virtual machine (via VirtualBox), I needed to install guest additions. However, the installation fails saying (in /var/log/vboxadd-install.log):

Error! Your kernel headers for kernel 3.16.0-31-generic cannot be found.

So, I tried to install it in the usual way and got:

Package linux-headers-3.16.0-31-generic is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source[.]

Having installed linux-headers-generic, which should provide the correct headers, I was confused. This is the sort of error I would expect if 3.16.0-31 was out of date. But . . . indeed dpkg -l | grep generic produces:

ii linux-headers-3.19.0-17-generic ...

A ha! So it looks like the guest additions are trying to use an outdated kernel. Maybe they use uname. So I tried uname -r and got:


My guess is that the guest additions are using uname to get the desired kernel header version, but that uname is giving the incorrect value for whatever reason. Question: If my analysis is right, how do I fix it? If not, what's the problem?

EDIT: After looking around, it seems that this means the running kernel is actually 3.16.0-31, while 3.19.0-17 is merely installed. I sudo update-grubd, confirmed that 3.19 kernel is the 0th element of /boot/grub/menu.lst and rebooted, but it doesn't seem to change anything.

EDIT: While /boot/grub/menu.lst is correct (the 0th entry is 3.19), on reboot and holding Shift to get the manual menu, I do not see the 3.19 kernel, and the top entry is the 3.16 kernel.

  • uname probably (technically) isn't giving you the wrong value; That's saying that you're running kernel version 3.16 and not 3.19. Have you restarted the VM since the upgrade? May 15, 2015 at 2:32
  • @saiarcot895 While I had rebooted, I just figured that and some other things out. See edit.
    – imallett
    May 15, 2015 at 2:36
  • Do you have a display attached to the VM, from which you can see the boot, or are you SSH'ing in? If the latter, you could try getting rid of linux-image-3.16.0-31-generic and linux-image-extra-3.16.0-31-generic. That way, your VM will be forced to boot the latest kernel. May 15, 2015 at 2:40
  • Also, make sure that the corresponding packages for 3.19.0-17 are installed; you don't want to be left with an unbootable VM. May 15, 2015 at 2:41
  • @saiarcot895 see 2nd edit. GrUB doesn't seem to be recognizing the 3.19 kernel on bootup at all, even though update-grub can after booting into 3.16. I already tried purging/reinstalling grub to no avail.
    – imallett
    May 15, 2015 at 2:56

2 Answers 2


It looks like upgrade process from 14.10 to 15.04 has a bug. Kernel does not install correctly. This can be fixed by running:

sudo apt-get install linux-generic

This will pull both linux-image-generic and linux-headers-generic.

These meta packages always point to the latest kernel image and headers.

This is not the first question with this kind of a problem.


fixed mine with:

uname -r

sudo apt-get update
sudo apt-get dist-upgrade

uname -r


sudo apt-get install linux-image-generic
sudo reboot

uname -r

followed by:

sudo /etc/init.d/vboxdrv setup
  • You need to make sure that headers are up to date too.
    – Pilot6
    May 26, 2015 at 21:00

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.