63

Here is how the error output is if I run virtualbox from the terminal. How to correct it? I am on a Ubuntu 12.10 64bit machine.

virtualbox
WARNING: The character device /dev/vboxdrv does not exist.
     Please install the virtualbox-ose-dkms package and the appropriate
     headers, most likely linux-headers-generic.

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

EDIT:

I have both the latest linux-headers-generic and virtualbox-ose-dkms packages

sultan.of.swing
  • 1,090
  • 1
  • 12
  • 23
footy
  • 5,803
  • 13
  • 48
  • 96
  • It says exactly what you need to do, install virtualbox-ose-dkms. Try typing `sudo apt-get install virtualbox-ose-dkms` and see if it goes away... – Joakim Nohlgård Nov 08 '12 at 14:34
  • 4
    @JoakimGebart I have done that. Still it gives me error – footy Nov 08 '12 at 14:47
  • 10
    Dont downvote this question, I just had the same problem (installing virtualbox-ose-dkms didnt solve it). The accepted answer works as it triggers the kernel module recompilation – Erin Drummond Dec 09 '12 at 08:41
  • 1
    looks like this question is really popular! 18k views at this time. – footy Mar 27 '15 at 00:04
  • [This answer](https://stackoverflow.com/questions/39030662/cant-install-virtualbox-in-arch/59536730#59536730) I posted, solved the issue for me – Adriana Hernández Dec 30 '19 at 21:36

3 Answers3

76

Before attempting to run this be sure that the current running Kernel headers are installed on your system. If you don't you will receive an error indicating that you need to install them or use the --kernelsource option to point to said headers.

Following the directions on this blog post helped me. Basically after you install those two packages you also need to do the reconfiguration:

sudo dpkg-reconfigure virtualbox-dkms

sudo dpkg-reconfigure virtualbox
Community
  • 1
  • 1
Mike Ruelle
  • 884
  • 8
  • 4
23

After the two dpkg-reconfigure commands I also needed to run:

sudo modprobe vboxdrv

And to fix eth0:

sudo modprobe vboxnetflt
AlexD
  • 813
  • 9
  • 15
8

If you have the same problem in ubuntu 12.04 the above solution might not work (at least it didn't work for me and another two - see the error I was getting in note#1 bellow). Installing the Oracle version of Virtualbox however worked just fine.


Note #1: I was getting the errors below:

ndemou  ~ dkms status
virtualbox, 4.1.12: added
ndemou  ~ sudo dkms install virtualbox/4.1.12
Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.5.0-28-generic -C /lib/modules/3.5.0-28-generic/build M=/var/lib/dkms/virtualbox/4.1.12/build.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 3.5.0-28-generic (i686)
Consult /var/lib/dkms/virtualbox/4.1.12/build/make.log for more information.
ndemou
  • 4,691
  • 2
  • 30
  • 33