2

i get this error msg when doing sudo apt-get install virtualbox.

dpkg: dependency problems prevent configuration of virtualbox:
 virtualbox depends on virtualbox-dkms (>= 5.0.32-dfsg-0ubuntu1.16.04.2) | virtualbox-source (>= 5.0.32-dfsg-0ubuntu1.16.04.2) | virtualbox-modules; however:
  Package virtualbox-dkms is not configured yet.
  Package virtualbox-source is not installed.
  Package virtualbox-modules is not installed.
  Package virtualbox-dkms which provides virtualbox-modules is not configured yet.

dpkg: error processing package virtualbox (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of virtualbox-qt:
 virtualbox-qt depends on virtualbox (= 5.0.32-dfsg-0ubuntu1.16.04.2); however:
  Package virtualbox is not configured yet.

dpkg: error processing package virtualbox-qt (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                    Errors were encountered while processing:
 virtualbox-dkms
 virtualbox
 virtualbox-qt
E: Sub-process /usr/bin/dpkg returned an error code (1)
Niklas Rosencrantz
  • 3,287
  • 8
  • 37
  • 56
  • please [edit] your question and add: which version of Ubuntu are you using? which command did you execute which resulted with the errors provided in the question? – Yaron Mar 29 '17 at 10:37
  • Even if you get it working you'll be on quite an old version. Better to download the latest .deb file and install it with sudo dpkg -i filename.deb –  Mar 29 '17 at 10:46
  • Have you tried updating the cache, then opting to fix dependencies? The command is: `sudo apt-get update && sudo apt-get install -f` ; note there are no further options fter the `install -f` at this stage. Also, likely a duplicate of http://askubuntu.com/questions/263378/how-to-fix-dependencies-broken-packages – taifwa Mar 29 '17 at 12:26
  • Nothing works. I tried everything. VirtualBox has never worked well. – Niklas Rosencrantz Mar 29 '17 at 16:54

3 Answers3

1

This is how I solved mine in the past.

  1. visit https://www.virtualbox.org/wiki/Linux_Downloads

  2. Download the one that is applicable to your system.

  3. Run from bash: $ sudo dpkg -i filename.deb to install it.
saviour123
  • 514
  • 1
  • 5
  • 16
  • `error: subprocess paste was killed by signal (Broken pipe) Processing triggers for systemd (229-4ubuntu16) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ... Errors were encountered while processing: virtualbox-5.1_5.1.18-114002~Ubuntu~xenial_amd64.deb` – Niklas Rosencrantz Mar 29 '17 at 16:53
  • sudo apt --fix-broken install. solved me the peer dependencies problem. – Mukundhan Feb 14 '20 at 07:27
0

when additional dependencies are not getting installed, it causes a broken install.

Install the broken dependencies manually using,

sudo apt --fix-broken install

and trying again solved the issue.

Mukundhan
  • 101
  • 2
0

Solution: sudo apt-get purge virtualbox*

Niklas Rosencrantz
  • 3,287
  • 8
  • 37
  • 56