尝试在 Debian Buster 上安装虚拟盒时未满足依赖关系

尝试在 Debian Buster 上安装虚拟盒时未满足依赖关系

我正在尝试在 Debian 10.5 中安装 virtual box,但收到有关未满足依赖项的错误消息。尝试了多种解决方案但没有任何效果。任何想法将不胜感激。

这是命令和输出:

sudo apt-get install virtualbox linux-headers-$(dpkg --print-architecture)
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 : Depends: python3 (>= 3.8~) but 3.7.3-1 is to be installed

Depends: python3.8 but it is not installable
Depends: libgcc-s1 (>= 3.0) but it is not installable
Depends: libgsoap-2.8.91 but it is not installable
Depends: libpython3.8 (>= 3.8.2) but it is not installable
Depends: libvpx6 (>= 1.6.0) but it is not installable
Recommends: virtualbox-qt (= 6.1.6-dfsg-1) but it is not going to be installed
Recommends: libqt5core5a (>= 5.12.2) but it is not going to be installed
Recommends: libqt5gui5 (>= 5.0.2) but it is not going to be installed or libqt5gui5-gles (>= 5.0.2) but it is not installable
Recommends: libqt5opengl5 (>= 5.0.2) but it is not going to be installed
Recommends: libqt5widgets5 (>= 5.0.2) but it is not going to be installed

E: Unable to correct problems, you have held broken packages.

这是我目前的消息来源。也许我需要添加一些东西?

cat /etc/apt/sources.list
# 

# deb cdrom:[Debian GNU/Linux 10.5.0 _Buster_ - Official amd64 NETINST 20200801-11:34]/ buster main

#deb cdrom:[Debian GNU/Linux 10.5.0 _Buster_ - Official amd64 NETINST 20200801-11:34]/ buster main

deb http://deb.debian.org/debian/ buster main
deb-src http://deb.debian.org/debian/ buster main

deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main

# buster-updates, previously known as 'volatile'
deb http://deb.debian.org/debian/ buster-updates main
deb-src http://deb.debian.org/debian/ buster-updates main

答案1

对于 Debian 10 你应该使用卢卡斯·努斯鲍姆的包裹

(我不会在此处重现说明;如果上面的链接不再可用,则软件包也不再可用。)

正如上面提到的Virtual Box 上的 Debian wiki 页面,Debian 上推荐的虚拟化管理器是libvirt,它具有许多前端,例如virt-manager或 GNOME Boxes。

答案2

问题是由于virtualbox :取决于: python3 (>= 3.8~) 但要安装 3.7.3-1:Debian stable 没有提供足够新的 Python 版本。看起来这个包是为 Ubuntu 20.10 构建的。

您可以尝试从 Debian 测试安装 Python(它包含 Python 3.8),但它可能会以各种意想不到的方式破坏您的系统:

https://serverfault.com/questions/22414/how-can-i-run-debian-stable-but-install-some-packages-from-testing

答案3

在 Debian 12 上,当我尝试从 Fast Track 存储库安装 VirtualBox 时,我也遇到了依赖关系问题,但这是因为https://fasttrack.debian.net/没有更新(它提到了靶心而不是书虫代号)。

在找到解决方案之前,我开始像其他人建议的那样使用 virt-manager,它看起来是 VirtualBox 的一个很好的替代品(它的缺点是具有一些功能,例如相机支持,这些功能不是使用扩展包开源的)。

相关内容