0

I recently upgraded Ubuntu from 14.04 to 15.04 and from my understanding vivid uses linux 3.19.0-16-generic kernal. However, when I use:

uname -r 

It says I'm using 3.16.0-46-generic.

This is a problem because when I am trying to execute:

sudo /etc/init.d/vboxadd setup

it fails. The log reveals that kernal headers for kernal 3.16.0-46-generic cannot be found. After I tried to install these headers using

sudo apt-get install build-essential linux-headers-$(uname -r)

and

sudo aptitude install linux-headers-3.16.0-46-generic

I get:

Package 'linux-headers-3.16.0-46-generic' has no installation candidate.

I've tried adding sources from the trusty-updates' linux-headers pages, but that doesn't work. Any idea on what is the issue and how to fix it?

  • 1
    since you are running Vivid Vervet I wouldn't expect trusty-updates to work. I have a tendency to stick with the LTS versions. That being said you could take a look at /var/log/vboxadd-install.log for some clarity. What version of virtualbox are you using? My version of 15.04 (on a test system) is up to date using 3.19.0.26-generic have you tried to apt-get update and apt-get upgrade? – Elder Geek Oct 24 '15 at 14:29
  • @ElderGeek I'm using VirtualBox 5. /var/log/vboxadd-install.log says: Error! Your kernal headers for kernel 3.16.0-46-generic cannot be found. Please install the linux-headers-3.16.0-46-generic package, or use the --kernelsourcedir option to tell DKMS where it's located Failed to install using DKMS, attempting to install without /tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop. Creating user for the Guest additions. Creating udev rule for the Guest Additions kernel module. – JayyOnline7 Oct 24 '15 at 14:46
  • @ElderGeek

    I have tried apt-get update and apt-get upgrade but they were no use. To me it seems like there may be a bug preventing my upgrade to 15.04 receiving the right kernel. But I'm inexperienced with this so I may be wrong.

    – JayyOnline7 Oct 24 '15 at 14:52
  • Related: http://askubuntu.com/questions/617065/why-wasnt-my-kernel-upgraded-when-i-upgraded-the-system – Elder Geek Oct 24 '15 at 14:54
  • You may need to update grub. – Elder Geek Oct 24 '15 at 14:55
  • @ElderGeek Ah, okay. Well sudo apt-get install linux-generic seems to be working. I noticed that this may not work if grub is set to use the last working version of Kernel. Is this something I should be worried about? – JayyOnline7 Oct 24 '15 at 14:58
  • if your uname -r output is still not correct then you need to resolve that. – Elder Geek Oct 24 '15 at 15:00
  • @ElderGeek It worked! Thanks for your help, mate. Wasn't expecting it so quickly. – JayyOnline7 Oct 24 '15 at 15:06
  • Your welcome and Welcome to askubuntu! , I've written the working solution up as an answer. If it's complete please upvote/accept it so that others with the same issue can find a solution. If not, please write a more detailed answer for the same reason. – Elder Geek Oct 24 '15 at 15:59

1 Answers1

1

Begin by updating your kernel to the latest version as shown here

Check to insure that your kernel version is correct for your version of Ubuntu with the command uname -r if not, issue the command sudo update-grub and reboot into the most current kernel. Try your vboxadd command again.

Elder Geek
  • 36,023
  • 25
  • 98
  • 183