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
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[.]
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.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.
/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.