VirtualBox '/etc/init.d/vboxdrv setup' issue
Solution 1
Should peruse /var/log/vbox-install.log file to determine the issue. If the problem persists, you may want to download and install the latest v4.2.2 version directly from https://www.virtualbox.org/wiki/Downloads (for kernel 3.6.* and below). Good luck.
Solution 2
I also encountered this issue several times once I upgrade my linux kernel.
What I did:
sudo apt-get install linux-headers-`uname -r`
Reconfigure dkms and load module:
sudo dpkg-reconfigure virtualbox-dkms
sudo modprobe vboxdrv
Then VirtualBox works. No computer reboot needed.
Solution 3
Here's EXACTLY how to do it on 12.10:
Make sure there are no traces of dkms, (virtualbox/ virtualbox-4.2), linux generic headers (..17):
***Replace virtualbox-4.2 with the version you have already installed. If you haven't installed it yet then proceed to step 2.
sudo apt-get purge virtualbox-4.2 dkms linux-headers-$(uname -r)
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install virtualbox-4.2
You MUST install the linux headers BEFORE virtualbox otherwise the VBox installation will error when trying to set up the vboxdrv section because the linux headers aren't installed.
Solution 4
Reinstall "virtualbox-dkms"
sudo apt-get install --reinstall virtualbox-dkms
It worked for me.
Solution 5
I had the same problem and I solved with the installation of the kernel headers.
sudo apt-get install linux-headers-`uname -r`
After the installation of the headers, DKMS was set-up properly and Virtualbox just worked after a reboot.
Still, there is no vboxdrv in /etc/init.d.
Note: the package I initially installed was virtualbox (non ose):
sudo apt-get install virtualbox
Dr_Bunsen
I switched from Ubuntu to Debian because of Ubuntu adding unity-lenses-shopping, the built in amazon add app, and the ad server they implemented.
Updated on September 18, 2022Comments
-
Dr_Bunsen over 1 year
I have installed VirtualBox through the software centre, but when I try to start a VM, I get the following error:
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
'/etc/init.d/vboxdrv setup'
as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
I already updated my
dkms
and installedlinux-headers
, but this/etc/init.d/vboxdrv
doesn't exist.I have been googling but I can't find an answer.
-
Shaharil Ahmad over 10 yearslike others said, reinstall "virtualbox-dkms"
-
Michael almost 9 yearsThis happened to me after kernel update (ubuntu). For me it was just: "sudo apt-get install virtualbox". Installation process created kernel module for me.
-
H2ONaCl over 8 yearsThe original post regards 12.10. If you are having this problem for 14.04, which may be more likely at the time of writing, use
virtualbox.org
instead of the one inUbuntu Software Centre
. The doc has long winded instructions but the following link is a shorter read. If you ignore the part about HTTPS then it is brief. virtualbox.org/wiki/Linux_Downloads -
bain over 8 yearsPossible duplicate of Virtualbox Kernel driver not installed
-
-
Dr_Bunsen over 11 yearsthere is no freaking log file.... lol, I will just try the download from that site, I will be back to you when thats done and tested.
-
cogitoergosum over 11 yearsIC - no log file "can" be an issue. LOL
-
Dr_Bunsen over 11 yearsok, I purged all the stuff I had, downloaded it from that site, and it started nicely, I am now installing an os, thanks mate!
-
Dr_Bunsen over 11 yearsThanks, tried this before posting my question, but it didnt work. The answer I selected as "The answer" is selected because the install from the site worked, and I would not have thought of it, since I thought it were the same files.
-
Vincenzo Pii over 11 years@Dr_Bunsen No problem :)! Installing the headers and rebooting worked for me, but maybe I had some other packages installed that made the difference (even if I installed vbox as one of the first packages after a clean installation of 12.10).
-
Dr_Bunsen over 11 yearsThanks but when I download virtualbox directly from the site, I don't have to do anything but 'sudo dpkg -i virtualbox.deb'. Less work.
-
HankHendrix over 11 yearsthen you are lucky! if you should need to mess about with linux headers at all then it's important to install them before virtualbox
-
Aswin P J over 11 yearsJust install the linux-headers as you pointed out, then
sudo ./etc/init.d/vboxdrv setup
will take care of updating dkms. -
Joseph over 11 yearsUnfortunately it seems the VirtualBox package in the repos is faulty. Evidently no one tests these packages...
-
Benjamin Crouzier about 11 years
modprobe vboxdrv
Tells me:FATAL: Module vboxdrv not found.
-
cmc about 11 years@pinouchon Did
dpkg-reconfigure virtualbox-dkms
output any error messages? -
Dr_Bunsen about 11 yearstop most answer says the exact same thing. Thanks anyway
-
andy u about 11 yearsJust re-read the first post and you're right. But i had like 3 or 4 tabs open researching for the answer so I was skimming through posts and trying things out and I think I was mildly frustrated so I missed the second part of his answer. Anyway, I also posted this as a more thorough instruction for the beginner (like me) who can't remember simple stuff like how do I install a .deb package. Cheers :)
-
David about 11 yearsUnfortunately even this does not work for me. I get the error: "Cannot install 'libpython2.7:i386'", but I already have libpython2.7 installed.
-
HankHendrix about 11 yearsNice one Andre!
-
mdesantis about 11 yearsthe answer by Jason Zhu works for me
-
Will over 10 yearsI have to to this every few weeks or so, it seems, as I upgrade my system. Any way to get it permanently fixed?
-
L Li over 10 yearsI used "sudo apt-get install virtualbox" and it worked great. thanks
-
Nabil Kadimi over 10 years@GarrettFogerlie Maybe in your case it worked, but the OP clearly specifies that he already installed the headers, so I assume you didn't read the question.
-
Onimusha over 10 yearssudo dpkg-reconfigure virtualbox-dkms
-
Ravi Dhoriya ツ about 10 yearsOsm, worked like charm :D Thank you so0o much
-
armb about 10 years
sudo /etc/init.d/vboxdrv setup
didn't work for me (it was what VirtualBox suggested when it failed to restart a saved VM).dpg-reconfigure
followed bymodprobe
did. (12.04 LTS, VirtualBox 4.1.12) -
spaniard89 almost 10 yearsThis got my vm starting, but with a network failure. After I do these steps I also need to
sudo modprobe vboxnetflt
-
Lynob over 9 yearsyour answer is perhaps the most handy answer on the entire SE network to me, I've been using these commands, at least 4 times in the last 2 weeks
-
Evan Carroll about 9 yearsBad advice.. This is handeled by the
/etc/init.d/virtualbox
script. Adding it here makes it redundant and harder to maintain and manage. -
Nicolas Raoul over 8 yearsOn 2015.04 I get
/usr/sbin/dpkg-reconfigure: virtualbox-dkms is not installed
-
Sk4ry over 8 yearsJust executing
sudo apt-get install virtualbox-dkms
works for me. -
kyb over 6 yearsI had the same problem on Manjaro 17.
sudo modprobe vboxdrv
solves the problem. More info on wiki.archlinux.org/index.php/…