尝试安装 SDL2-Dev 失败,因为 Debian 上的依赖关系未得到满足

尝试安装 SDL2-Dev 失败,因为 Debian 上的依赖关系未得到满足

在Debian中执行以下命令时,

apt-get install libsdl2-dev

我遇到一个错误:

The following packages have unmet dependencies:
libsdl2-dev : Depends: libegl1-mesa-dev but it is not going to be installed
              Depends: libgl1-mesa-dev but it is not going to be installed
              Depends: libgles2-mesa-dev but it is not going to be installed
              Depends: libglu1-mesa-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我昨天设置了系统,并没有做太多事情。我尝试过apt-get -f install并且apt autoclean

这是我的全部/etc/apt/sources.list

deb http://ftp.de.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.de.debian.org/debian/ stretch main contrib non-free

deb http://security.debian.org/debian-security stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free

# stretch-updates, previously known as 'volatile'
deb http://ftp.de.debian.org/debian/ stretch-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian/ stretch-updates main contrib non-free

#stretch-backports
deb http://httpredir.debian.org/debian stretch-backports main contrib non-free
deb http://ftp.debian.org/debian stretch-backports main

斯蒂芬的编辑:

root@debian:/home/kiryu# apt -o Debug::pkgProblemResolver=yes install libsdl2-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Starting pkgProblemResolver with broken count: 2
Starting 2 pkgProblemResolver with broken count: 2
Investigating (0) libsdl2-dev:amd64 < none -> 2.0.5+dfsg1-2 @un puN Ib >
Broken libsdl2-dev:amd64 Depends on libegl1-mesa-dev:amd64 < none | 13.0.6-1+b2 @un uH >
  Considering libegl1-mesa-dev:amd64 1 as a solution to libsdl2-dev:amd64 9999
    Reinst Failed early because of libegl1-mesa:amd64
  Considering libegl1-mesa-dev:amd64 1 as a solution to libsdl2-dev:amd64 9999
Broken libsdl2-dev:amd64 Depends on libgl1-mesa-dev:amd64 < none | 13.0.6-1+b2 @un uH >
  Considering libgl1-mesa-dev:amd64 2 as a solution to libsdl2-dev:amd64 9999
    Reinst Failed early because of libdrm2:amd64
    Reinst Failed because of libdrm-dev:amd64
    Reinst Failed because of mesa-common-dev:amd64
  Considering libgl1-mesa-dev:amd64 2 as a solution to libsdl2-dev:amd64 9999
Broken libsdl2-dev:amd64 Depends on libgles2-mesa-dev:amd64 < none | 13.0.6-1+b2 @un uH >
  Considering libgles2-mesa-dev:amd64 1 as a solution to libsdl2-dev:amd64 9999
    Reinst Failed early because of libgles2-mesa:amd64
  Considering libgles2-mesa-dev:amd64 1 as a solution to libsdl2-dev:amd64 9999
Investigating (0) libglu1-mesa-dev:amd64 < none -> 9.0.0-2.1 @un uN Ib >
Broken libglu1-mesa-dev:amd64 Depends on libgl1-mesa-dev:amd64 < none | 13.0.6-1+b2 @un uH >
  Considering libgl1-mesa-dev:amd64 2 as a solution to libglu1-mesa-dev:amd64 0
  Holding Back libglu1-mesa-dev:amd64 rather than change libgl1-mesa-dev:amd64
Broken libglu1-mesa-dev:amd64 Depends on libgl-dev:amd64 < none @un H >
  Considering libgl1-mesa-dev:amd64 2 as a solution to libglu1-mesa-dev:amd64 0
  Holding Back libglu1-mesa-dev:amd64 rather than change libgl-dev:amd64
  Or group keep for libglu1-mesa-dev:amd64
Investigating (1) libsdl2-dev:amd64 < none -> 2.0.5+dfsg1-2 @un puN Ib >
Broken libsdl2-dev:amd64 Depends on libegl1-mesa-dev:amd64 < none | 13.0.6-1+b2 @un uH >
  Considering libegl1-mesa-dev:amd64 1 as a solution to libsdl2-dev:amd64 9999
  Considering libegl1-mesa-dev:amd64 1 as a solution to libsdl2-dev:amd64 9999
Broken libsdl2-dev:amd64 Depends on libgl1-mesa-dev:amd64 < none | 13.0.6-1+b2 @un uH >
  Considering libgl1-mesa-dev:amd64 2 as a solution to libsdl2-dev:amd64 9999
  Considering libgl1-mesa-dev:amd64 2 as a solution to libsdl2-dev:amd64 9999
Broken libsdl2-dev:amd64 Depends on libgles2-mesa-dev:amd64 < none | 13.0.6-1+b2 @un uH >
  Considering libgles2-mesa-dev:amd64 1 as a solution to libsdl2-dev:amd64 9999
  Considering libgles2-mesa-dev:amd64 1 as a solution to libsdl2-dev:amd64 9999
Broken libsdl2-dev:amd64 Depends on libglu1-mesa-dev:amd64 < none | 9.0.0-2.1 @un uH >
  Considering libglu1-mesa-dev:amd64 0 as a solution to libsdl2-dev:amd64 9999
    Reinst Failed because of libgl1-mesa-dev:amd64
    Reinst Failed because of libgl1-mesa-dev:amd64
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:
 libsdl2-dev : Depends: libegl1-mesa-dev but it is not going to be installed
               Depends: libgl1-mesa-dev but it is not going to be installed
               Depends: libgles2-mesa-dev but it is not going to be installed
               Depends: libglu1-mesa-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

编辑:输入时apt install -t stretch-backports libsdl2-dev,我收到以下错误:

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:
 udev : Breaks: systemd (< 233-4)
        Breaks: systemd:i386 (< 233-4)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

编辑:

root@debian:/home/kiryu# dpkg -l | grep i386
ii  gcc-6-base:i386                       6.3.0-18+deb9u1                             i386         GCC, the GNU Compiler Collection (base package)
ii  libbsd0:i386                          0.8.3-1                                     i386         utility functions from BSD systems - shared library
ii  libc6:i386                            2.24-11+deb9u3                              i386         GNU C Library: Shared libraries
ii  libc6-i386                            2.24-11+deb9u3                              amd64        GNU C Library: 32-bit shared libraries for AMD64
ii  libgcc1:i386                          1:6.3.0-18+deb9u1                           i386         GCC support library
ii  libx11-6:i386                         2:1.6.4-3                                   i386         X11 client-side library
ii  libxau6:i386                          1:1.0.8-1                                   i386         X11 authorisation library
ii  libxcb1:i386                          1.12-1                                      i386         X C Binding
ii  libxdmcp6:i386                        1:1.1.2-3                                   i386         X11 Display Manager Control Protocol library

答案1

正是因为libgles2-mesa-dev.如果您尝试使用以下命令安装它:

sudo apt install libgles2-mesa-dev

您将得到:以下软件包具有未满足的依赖关系:

libgles2-mesa-dev : Depends: libgles2-mesa (= 13.0.6-1+b2) but 18.1.9-1~bpo9+1 is to be installed
                     Depends: libegl1-mesa-dev but it is not going to be installed

如果您尝试安装最新的台面,您就会破坏 32 位蒸汽,同时您被迫安装 sid 软件包来构建该台面。

对于初学者来说,这个混乱需要一个关于 SDL2 的报告错误,我建议你这样做。

相关内容