0

I am pretty new to Ubuntu. I had been using genymotion for the past 2-3 days. When I tried to start it today, it indicated something is wrong with the virtualbox. I had it installed from the repos. I have uninstalled it, then reinstalled it again from the repos, then uninstalled it again and then reinstalled using the .deb from the VirtualBox site. Tried installing dkms, nothing happened. Trying to start Virtual Box I am getting this message,

      WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (4.4.0-65-generic) or it failed to load. Please recompile the kernel module and install it by

       sudo /sbin/vboxconfig

       You will not be able to start VMs until this problem is fixed.

Trying to run sudo /sbin/vboxconfig, I get this:

vboxdrv.sh: Building VirtualBox kernel modules.

 This system is not currently set up to build kernel modules (system extensions).

  Running the following commands should set the system up correctly:

  apt-get install linux-headers-4.4.0-65-generic
  (The last command may fail if your system is not fully updated.)
   apt-get install linux-headers-generic
   vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.

  This system is not currently set up to build kernel modules (system extensions).

   Running the following commands should set the system up correctly:

  apt-get install linux-headers-4.4.0-65-generic

  (The last command may fail if your system is not fully updated.)

  apt-get install linux-headers-generic

  There were problems setting up VirtualBox.  To re-start the set-up process, run /sbin/vboxconfig as root.

The contents of /var/log/vbox-install.log is:

Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR <directory> and run Make again.  Stop.

Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR <directory> and run Make again.  Stop.

Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR <directory> and run Make again.  Stop.

Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR <directory> and run Make again.  Stop.

Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR <directory> and run Make again.  Stop.

Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR <directory> and run Make again.  Stop.

And running apt-get install linux-headers-4.4.0-65-generic, I get:

  Package linux-headers-4.4.0-65-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

  E: Package 'linux-headers-4.4.0-65-generic' has no installation candidate
  • First, how are you installing virtualbox ? Second, did you read the message ? It gives clear instructions. apt-get install linux-headers-generic , gave you that message more then once, so, sudo apt-get update && sudo apt-get upgrade && sudo apt-get install linux-headers-generic and then try again to install vbox. Vbox is in the repos , and KVM and similar are supported out of the box as alternates to vbox. – Panther Mar 3 '17 at 16:31
  • @bodhi.zazen Of course I did try all of those. But it didn't fix it. I installed first from the repos, then the .deb from the site. And gennymotion requires virtualbox, kvm won't do, I think – codeNoob Mar 3 '17 at 16:36
  • Of course you did what ? You need to update your question with 1. How are you installing vbox ? and what commands you ran to try to fix the problem. See also - help.ubuntu.com/community/VirtualBox/Installation – Panther Mar 3 '17 at 16:38
  • @bodhi.zazen Sorry updated the comment. – codeNoob Mar 3 '17 at 16:39
  • Update the question, not everyone reads the comments. See also the link I gave you and tell us where you got what version of vbox and tried installing it how ..... – Panther Mar 3 '17 at 16:40
0

This error may occour when the module is not loaded. Even if you don't use Arch Linux, you can still read this: https://wiki.archlinux.org/index.php/VirtualBox#Load_the_VirtualBox_kernel_modules

So, just try:

sudo modprobe vboxdrv

or reboot your computer.

  • In Ubuntu that error is because the headers are not installed so modprobe will not work (yet) . The arch linux documents are awesome, but with Ubuntu use the ubuntu docs - help.ubuntu.com/community/VirtualBox – Panther Mar 3 '17 at 17:00
  • Hmmm, then update your system using "sudo apt-get update && sudo apt-get dist-upgrade", reinstall the headers, virtualbox and reboot / use modprobe. – Thomas William Mar 3 '17 at 17:06
  • On ubuntu, to install the headers, you need sudo apt-get install linux-headers-generic as in the message given to the user in the output on the command s/he ran, as in my comments. With Ubuntu see help.ubuntu.com/community/VirtualBox/Installation and virtualbox.org/wiki/Linux_Downloads – Panther Mar 3 '17 at 17:34
  • "Package linux-headers-4.4.0-65-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 E: Package 'linux-headers-4.4.0-65-generic' has no installation candidate". That's because kernel headers were deleted from the repos because there is a new kernel release avaliable. So, s/he must update the whole system before installing the headers. – Thomas William Mar 3 '17 at 17:46
  • @ThomasWilliam But sudo apt-get dist-upgrade says there's nothing to upgrade, same as upgrade. – codeNoob Mar 3 '17 at 18:01

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.