After upgrading an Ubuntu GNOME 15.10 machine to 16.04 I have encountered some problems with my VirtualBox and dkms installation. It seems that during the upgrade dkms had some problems registering the old kernel (4.2) going and the new one coming (4.4)... So now I am unable to run VirtualBox VMs, and even though I have tried purging both applications, upon reinstall this is what I get:

Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modulesrmdir: failed to remove '': No such file or directory
rmdir: failed to remove '': No such file or directory
rmdir: failed to remove '': No such file or directory
 ...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...failed!
  (modprobe vboxdrv failed. Please use 'dmesg' to find out why)
Setting up dkms (2.2.0.3-2ubuntu11) ...

The rmdir: failed to remove '': No such file or directory is a new error which only came this time after install both applications after having purged them, but apart from that the error is mostly the same and there seems to be no real mention of any of this from dmesg so I don't really know what to do... Perhaps if I could find the full upgrade log that would help me to know exactly what happened during the big upgrade...

So my question is, what do these errors mean and how do I fix them without having to just do a fresh install? Also will this cause any other problems apart from just VirtualBox not running properly?

Information Update:

When running VirtualBox through Terminal I get the following output:

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

           sudo /sbin/rcvboxdrv setup

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

But when I run that command all I get is:

Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...failed!
  (modprobe vboxdrv failed. Please use 'dmesg' to find out why)

And the only seemingly relevant to this output from dmesg is:

[ 3408.206685] capability: warning: `VirtualBox' uses 32-bit capabilities (legacy support in use)

Running the same command but without sudo and with status instead of setup the output is:

VirtualBox kernel module is not loaded.

marked as duplicate by Seth May 30 '16 at 20:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • And whats the output of dmesg? – Videonauth May 29 '16 at 17:19
  • @Videonauth: Please see my updated question for more information. – user364819 May 29 '16 at 18:05