2

I'm with Ubuntu 15.04 and I'm trying to create an emulator (genymotion), but when run virtualbox, i got the error:

Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMSError! Your kernel headers for kernel 3.16.0-30-generic cannot be found.
Please install the linux-headers-3.16.0-30-generic package, or use the --kernelsourcedir option to tell DKMS where it's located ...failed!
(Failed, trying without DKMS) Recompiling VirtualBox kernel modules ...failed! (Look at /var/log/vbox-install.log to find out what went wrong)

I performed

uname -a

And the result is:

Linux douglas 3.16.0-30-generic #40-Ubuntu SMP Mon Jan 12 22:06:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Someone help me?Already I uninstalled and installed again.

Roknauta
  • 290
  • 3
  • 15
  • Why are you running Utopic kernel with the Vivid OS? – Terrance Jul 09 '15 at 21:24
  • How do I fix this? – Roknauta Jul 09 '15 at 21:25
  • Run `sudo apt-get install linux-headers-generic-lts-utopic` from a terminal window and reboot the host when completed. – Terrance Jul 09 '15 at 21:27
  • Appeared this message: E: Impossível encontrar o pacote linux-headers-generic-lts-utopic – Roknauta Jul 09 '15 at 21:31
  • Did you install the new kernel for your Ubuntu 15.04? Ubuntu 15.04 by default comes with kernel 3.19. – Terrance Jul 09 '15 at 21:34
  • I do not know, I am new to linux. – Roknauta Jul 09 '15 at 21:34
  • Type in `lsb_release -a` from the terminal window, and what does it say? – Terrance Jul 09 '15 at 21:36
  • No LSB modules are available Distributor ID: Ubuntu Description: Ubuntu 15.04 Release: 15.04 Codename: vivid – Roknauta Jul 09 '15 at 21:38
  • Try `sudo apt-get install linux-headers-generic-lts-vivid` from a terminal window – Terrance Jul 09 '15 at 21:41
  • E: Impossível encontrar o pacote linux-headers-generic-lts-vivid – Roknauta Jul 09 '15 at 21:42
  • Try `sudo apt-get install linux-headers-3.16.0-30-generic` from the terminal window. – Terrance Jul 09 '15 at 21:45
  • E: O pacote 'linux-headers-3.16.0-30-generic' não possui candidato para instalação – Roknauta Jul 09 '15 at 21:46
  • What does `sudo update-grub` produce? – Terrance Jul 09 '15 at 21:50
  • Generating grub configuration file ... Atenção: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported. Encontrado imagem linux: /boot/vmlinuz-3.16.0-30-generic Encontrado imagem initrd: /boot/initrd.img-3.16.0-30-generic Found memtest86+ image: /boot/memtest86+.elf Found memtest86+ image: /boot/memtest86+.bin concluído – Roknauta Jul 09 '15 at 21:53
  • The kernel has been removed. Follow the instructions [here](http://askubuntu.com/questions/28099/how-to-restore-a-system-after-accidentally-removing-all-kernels) to reinstall the 3.19 kernel. You will need to boot your system from the Ubuntu 15.04 LiveCD / Install CD – Terrance Jul 09 '15 at 21:56
  • 1
    Possible duplicate of [VirtualBox 4.3 on Ubuntu 13.10 unable to run VM](http://askubuntu.com/questions/405633/virtualbox-4-3-on-ubuntu-13-10-unable-to-run-vm) – user.dz Jun 22 '16 at 15:58

1 Answers1

1

You are missing the kernel for Ubuntu Vivid. Probably it was remove by accident. So here are the steps.

# Install latest kernel
$ sudo apt-get install linux-generic

# Restart your machine ...

# Recompile the kernel module for Virtualbox
$ sudo /etc/init.d/vboxdrv setup

I had the same problem after trying to install Virtualbox 5.0 on Ubuntu 15.04 and I think I 've removed also the kernel while purging the virtualbox packages.