如何在 Debian 10 上安装 virtualbox 5.2 或 6.0?

如何在 Debian 10 上安装 virtualbox 5.2 或 6.0?

我遵循了各种指南,例如

https://computingforgeeks.com/install-virtualbox-ubuntu-debian/

https://tecadmin.net/install-virtualbox-on-debian-10-buster/

在步骤:

apt install virtualbox-6.0

它失败了:

root@debian:~# apt-get update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://deb.debian.org/debian-security buster/updates InRelease              
Hit:3 http://deb.debian.org/debian buster-updates InRelease                       
Hit:4 http://download.virtualbox.org/virtualbox/debian stretch InRelease                                  
Get:5 https://download.virtualbox.org/virtualbox/debian buster InRelease [7,733 B]                        
Get:6 https://download.virtualbox.org/virtualbox/debian buster/contrib amd64 Packages [1,521 B]
Fetched 9,254 B in 2s (4,145 B/s)    
Reading package lists... Done
root@debian:~# apt-get install virtualbox-6.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 virtualbox-6.0 : Depends: libcurl3 (>= 7.16.2) but it is not installable
                  Depends: libvpx4 (>= 1.6.0) but it is not installable
                  Recommends: libsdl-ttf2.0-0 but it is not going to be installed
                  Recommends: linux-headers-generic but it is not installable or
                              linux-headers-generic-pae but it is not installable or
                              linux-headers-686-pae but it is not installable or
                              linux-headers-amd64 but it is not going to be installed or
                              linux-headers-2.6-686 but it is not installable or
                              linux-headers-2.6-amd64 but it is not installable or
                              linux-headers but it is not installable
                  Recommends: linux-image but it is not installable
E: Unable to correct problems, you have held broken packages.

我尝试手动安装这些依赖项,但如果我尝试安装 libcurl3,它告诉我只能安装 libcurl4。如果我安装 libcurl4,它似乎不会影响任何东西,因为它需要 libcurl3 而不是 4。

答案1

我想你可能需要deb http://download.virtualbox.org/virtualbox/debian bionic contrib。以下对我有用:

    wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
    wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

    echo "deb http://download.virtualbox.org/virtualbox/debian bionic contrib" >> /etc/apt/sources.list

    apt update
    apt install virtualbox-6.0

当您尝试时,最好删除/etc/apt/sources.list遵循其他指南时所做的任何更改。

答案2

virtualbox 软件包已发布Debian 10bustervirtualbox url 中接受代号。

您的 中应该有以下行/etc/apt/sources.list.d/virtualbox.list

deb https://download.virtualbox.org/virtualbox/debian buster contrib

virtualbox官网的安装说明:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

sudo apt-get update
sudo apt-get install virtualbox-6.0

virtualbox 存储库提供 3 个软件包版本: virtualbox-6.1virtualbox-6.0virtualbox-5.2

相关内容