從 .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 實例後

相關內容