Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running debian 7 and trying to install virtualbox using:

sudo apt-get install virtualbox

and getting this output:

Selecting previously unselected package virtualbox.
Unpacking virtualbox (from .../virtualbox_4.1.18-dfsg-2+deb7u1_amd64.deb) ...
Selecting previously unselected package virtualbox-dkms.
Unpacking virtualbox-dkms (from .../virtualbox-dkms_4.1.18-dfsg-2+deb7u1_all.deb) ...
Selecting previously unselected package virtualbox-qt.
Unpacking virtualbox-qt (from .../virtualbox-qt_4.1.18-dfsg-2+deb7u1_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for menu ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for shared-mime-info ...
Processing triggers for desktop-file-utils ...
Setting up libvncserver0:amd64 (0.9.9+dfsg-1) ...
Setting up virtualbox (4.1.18-dfsg-2+deb7u1) ...
insserv: script virtualbox: service vboxdrv already provided!
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing virtualbox (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of virtualbox-dkms:
 virtualbox-dkms depends on virtualbox (>= 4.1.18-dfsg-2+deb7u1); however:
  Package virtualbox is not configured yet.

dpkg: error processing virtualbox-dkms (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of virtualbox-qt:
 virtualbox-qt depends on virtualbox (= 4.1.18-dfsg-2+deb7u1); however:
  Package virtualbox is not configured yet.

dpkg: error processing virtualbox-qt (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

can anybody help?

share|improve this question
I'd try the following commands (in that order and of course with sudo: dpkg -P virtualbox virtualbox-dkms virtualbox-qt (removes the packages incl. config), apt-get clean (cleans the cache), apt-get update (fetches packages info), apt-get install virtualbox-dkms, apt-get install virtualbox. – mpy Oct 13 '13 at 8:44

This (french) article describes the same error on Debian : Virtualbox & vboxdrv.
The solution there was to delete two files and reinstall Virtualbox as follows

rm -r /etc/init.d/vboxdrv
rm -r /var/lib/update-rc.d/vboxdrv 
apt-get install virtualbox virtualbox-dkms virtualbox-guest-utils virtualbox-guest-additions virtualbox-qt

The article also lists a solution that works for Fedora :

/etc/init.d/vboxdrv setup

A comment later remarks that apt-get purge virtualbox should have been used instead of apt-get remove, which would have also removed the init script, so maybe this is the real cause of your problem, that can be solved simply by doing purge.

share|improve this answer
That actually worked for me. ty much – mburn Oct 13 '13 at 14:46
After trying almost everything else, I found this and it worked. Thank you very much! – Sgoettschkes Nov 29 '14 at 13:07

After you get that error, try apt-get -f install to force an install of the files that didn't get loaded because of the error. Then try apt-get upgrade again, apt-get -f install back and forth until only the package that has the error is left.

share|improve this answer

You must log in to answer this question.

protected by bwDraco May 8 '15 at 17:55

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .