重新安装 Virtualbox - 未满足的依赖关系/损坏的软件包?

重新安装 Virtualbox - 未满足的依赖关系/损坏的软件包?

我目前在升级 Virtualbox 时遇到了一些困难 - 我刚刚使用 apt 删除了 5.2 软件包(我正在运行 Debian 测试)并尝试重新安装它 - 我不断遇到无法解决的依赖问题:

root@debian:/home/nomax# apt install virtualbox-5.2 
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-5.2 : 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-image but it is not installable
E: Unable to correct problems, you have held broken packages.
root@debian:/home/nomax# 

目前使用最新 Virtualbox 版本的任何人都遇到此问题吗?

编辑:

root@debian:/# cat /etc/apt/sources.list:

# deb xxxx://ftp.au.debian.org/debian/ testing main contrib non-free

# replacement of debian main mirror as checked against netselect-apt

# deb xxxx://mirror.intergrid.com.au/debian/ testing main contrib non-free
deb xxxx://mirror.amaze.com.au/debian/ testing main contrib non-free

# deb-src xxxx://ftp.au.debian.org/debian/ testing main contrib non-free

deb xxxx://security.debian.org/debian-security testing/updates main contrib non-free
# deb-src xxxx://security.debian.org/debian-security testing/updates main contrib non-free

# stretch-updates, previously known as 'volatile'
deb xxxx://ftp.au.debian.org/debian/ testing-updates main contrib non-free

# deb-src xxxx://ftp.au.debian.org/debian/ testing-updates main contrib non-free

root@debian:/# cat /etc/apt/sources.list.d/*:

deb [arch=amd64] xxxxs://download.docker.com/linux/debian stretch stable
# deb-src [arch=amd64] xxxxs://download.docker.com/linux/debian stretch stable

deb [arch=amd64] xxxxs://download.docker.com/linux/debian stretch stable
# deb-src [arch=amd64] xxxxs://download.docker.com/linux/debian stretch stable

### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
# deb [arch=amd64] xxxx://dl.google.com/linux/chrome/deb/ stable main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
# deb [arch=amd64] xxxx://dl.google.com/linux/chrome/deb/ stable main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] xxxx://dl.google.com/linux/chrome/deb/ stable main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] xxxx://dl.google.com/linux/chrome/deb/ stable main
# Kubernetes Repo on Google
deb xxxx://apt.kubernetes.io/ kubernetes-xenial main
# Kubernetes Repo on Google
deb xxxx://apt.kubernetes.io/ kubernetes-xenial main
#deb xxxx://repository.spotify.com stable non-free
deb xxxx://repository.spotify.com stable non-free
deb xxxx://deb.torproject.org/torproject.org sid main
deb-src xxxx://deb.torproject.org/torproject.org sid main
deb xxxx://deb.torproject.org/torproject.org tor-experimental-0.3.4.x-sid main
deb-src xxxx://deb.torproject.org/torproject.org tor-experimental-0.3.4.x-sid main
deb xxxx://deb.torproject.org/torproject.org sid main
deb-src xxxx://deb.torproject.org/torproject.org sid main
deb xxxx://deb.torproject.org/torproject.org tor-experimental-0.3.4.x-sid main
deb-src xxxx://deb.torproject.org/torproject.org tor-experimental-0.3.4.x-sid main
# virtualbox official Oracle repository
deb xxxx://download.virtualbox.org/virtualbox/debian stretch contrib
# virtualbox official Oracle repository
deb xxxx://download.virtualbox.org/virtualbox/debian stretch contrib

答案1

在 Debian 测试中安装 virtualbox-5.2 二进制文件存在一个已知问题。

看到这个Virtualbox 论坛主题

总而言之,您尝试安装的 Debian Stretch 版本不适用于 Debian 测试,因为前者依赖于 libcurl3,而 Debian 测试现在使用 libcurl4。

他们建议的解决方案是手动安装 virtualbox 的 Ubuntu 18.04 软件包(回购)virtualbox-5.2_5.2.18-124319~Ubuntu~bionic_amd64.deb。我个人还没有尝试这样做,并且仍在我的 Debian 测试系统上使用旧版本 (5.2.14)。如果您确实安装了上述内容,请告诉我们它是否适合您,因为其他人会很好奇。

另一种方法是从 Debian 的 contrib 存储库安装 Virutalbox 的 Debian 测试包。看起来您已经在 resources.list 中设置了 contrib 存储库。您应该能够使用 来查看它apt-policy cache virtualbox并使用 来安装它apt install virtualbox。注意缺少-5.2.

答案2

我也遇到了:-(

最近我将工作站升级到 Devuan beowulf,完成后我丢失了 virtualbox 环境

内核:Linux版本4.19.0-13-686-pae

扫描互联网解决方案但没有任何效果...

经过几次失败的尝试后,我成功创建了一个新目录 /usr/local/preload/virtbox。在其中添加一些文件并更改 /usr/lib/i386-linux-gnu/ 中的内容

添加:

-rwxr-xr-x 1 root root 1413564 Jan 27 19:05 libcrypto.so.0.9.8
lrwxrwxrwx 1 root root 16 Jan 27 18:37 libcurl3.so -> libcurl.so.4.2.0
lrwxrwxrwx 1 root root 16 Jan 27 18:49 libcurl.so.4 -> libcurl.so.4.2.0
-rwxr-xr-x 1 root root 367476 Jan 27 18:36 libcurl.so.4.2.0
-rwxr-xr-x 1 root root 310992 Jan 27 19:01 libssl.so.0.9.8

重命名和符号链接:

lrwxrwxrwx 1 root root 2020年2月22日19日 _libcurl-gnutls.so.3 -> libcurl-gnutls.so.4
lrwxrwxrwx 1 root root 23 2020 年 2 月 22 日 libcurl-gnutls.so.4 -> libcurl-gnutls.so.4.5.0
-rw-r--r-- 1 root root 640596 2020 年 2 月 22 日 libcurl-gnutls.so.4.5.0
lrwxrwxrwx 1 root root 16 Jan 27 18:52 _libcurl.so.4 -> libcurl.so.4.5.0
lrwxrwxrwx 1 root root 39 Jan 27 21:32 libcurl.so.4 -> /usr/local/preload/virtbox/libcurl.so.4
-rw-r--r-- 1 root root 656988 2020 年 2 月 22 日 _libcurl.so.4.5.0

运行ldconfig一切正常。

之所以出现目录名预加载,是因为最初我想用 LD_PRELOAD 来解决它,但这只起作用了部分。

当我可以将旧库从我的防火墙盒(debian squeeze)提升到/usr/local/preload/virtbox时,最终的解决方案出现了。经过一番摆弄符号链接并重命名原始库后我可以做

dpkg -i virtualbox-5.2_5.2.42-137960~Debian~stretch_i386.deb

没有任何错误,我可以再次运行它:-)

基斯

相关内容