从 .deb 安装 virtualbox 时出现错误:错误的软件包处于“保持原样”模式

从 .deb 安装 virtualbox 时出现错误:错误的软件包处于“保持原样”模式

我想安装 virtualbox 来使用 genymotion。我下载了 .deb 包。运行命令时出现此错误sudo apt install ./virtualbox

The following packages contain unmet dependencies:
 virtualbox-7.0: Dependency: libc6 (>= 2.34) but 2.27-3ubuntu1.6 will have to be installed
                  Dependency: libgcc-s1 (>= 3.0) but it is not installable
                  Depends: libqt5core5a (>= 5.15.1) but 5.9.5+dfsg-0ubuntu2.6 should be installed
                  Dependent: libqt5dbus5 (>= 5.14.1) but 5.9.5+dfsg-0ubuntu2.6 should be installed
                  Dependent: libqt5gui5 (>= 5.14.1) but 5.9.5+dfsg-0ubuntu2.6 should be installed or
                           libqt5gui5-gles (>= 5.14.1) but it is not installable
                  Dependent: libqt5help5 (>= 5.15.1) but 5.9.5-0ubuntu1 should be installed
                  Dependent: libqt5widgets5 (>= 5.15.1) but 5.9.5+dfsg-0ubuntu2.6 will have to be installed
                  Depends: libssl3 (>= 3.0.0~~alpha1) but it is not installable
                  Depends: libstdc++6 (>= 12) but 8.4.0-1ubuntu1~18.04 will have to be installed
                  Depends: libvpx7 (>= 1.10.0) but it is not installable
                  Recommended: libsdl-ttf2.0-0 but will not be installed
                  Recommended: linux-image
E: Unable to fix problems, faulty packages are in "keep as is" mode.

我是 Linux 新手。我的 Ubuntu 版本是 18.04。

答案1

我找到了一个解决方案。

首先我执行了以下命令:

sudo apt remove virtualbox
sudo apt autoremove

然后我重新启动了机器并输入:

sudo apt install virtualbox

答案2

执行此命令

sudo apt --fix-broken install

安装完 VirtualBox 实例后

相关内容