VirtualBox 安装时不工作

VirtualBox 安装时不工作

我在执行时收到此错误消息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)

答案1

这就是我过去解决问题的方法。

  1. 访问https://www.virtualbox.org/wiki/Linux_Downloads

  2. 下载适合您系统的版本。

  3. 从 bash 运行:$ sudo dpkg -i filename.deb来安装它。

答案2

解决方案:sudo apt-get purge virtualbox*

答案3

当未安装其他依赖项时,会导致安装中断。

使用以下方法手动安装损坏的依赖项:

sudo apt --fix-broken install

并再次尝试解决了该问题。

相关内容