AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 548098
Accepted
AlphaCentauri
AlphaCentauri
Asked: 2019-10-23 03:38:28 +0800 CST2019-10-23 03:38:28 +0800 CST 2019-10-23 03:38:28 +0800 CST

为什么我首先在​​安装 freeglut3-dev 时遇到以下问题,我应该做些什么不同的事情?

  • 772

尝试安装 freeglut3-dev 时遇到以下问题。我很好奇为什么我首先遇到了这个问题,如果有的话,我应该做些什么不同的事情。

这是在 Debian 9.11 上,sources.list 在这个问题的底部。

# apt-get install freeglut3-dev

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

所以我决定尝试找出问题所在。

# apt-get install libgl1-mesa-dev

The following packages have unmet dependencies:
 libgl1-mesa-dev : Depends: mesa-common-dev (= 13.0.6-1+b2) but it is not going to be installed
                   Depends: libdrm-dev (>= 2.4.69) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

# apt-get install mesa-common-dev

The following packages have unmet dependencies:
 mesa-common-dev : Depends: libdrm-dev (>= 2.4.65) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

# apt-get install libdrm-dev

The following packages have unmet dependencies:
 libdrm-dev : Depends: libdrm2 (= 2.4.74-1) but 2.4.95-1~bpo9+1 is to be installed
E: Unable to correct problems, you have held broken packages.

# apt-get install libdrm2

libdrm2 is already the newest version (2.4.95-1~bpo9+1)

所以我安装了这个。

我尝试手动安装旧版本:

首先,我有旧版本吗?

# apt-cache policy libdrm2
libdrm2:
  Installed: 2.4.95-1~bpo9+1
  Candidate: 2.4.95-1~bpo9+1
  Version table:
 *** 2.4.95-1~bpo9+1 100
        100 /var/lib/dpkg/status
     2.4.74-1 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages

看起来像。来吧。

# apt-get install libdrm2=2.4.74-1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  audacious-plugins-data compton-conf-l10n libaudcore3 libaudgui3 libaudtag2
  libc-ares2 libcddb2 libcue1 libdouble-conversion1 libdrm-common libevdev2
  libfluidsynth1 libglvnd0 libguess1 libinput-bin libinput10 libmaxminddb0
  libmms0 libmodplug1 libmtdev1 libneon27-gnutls libpcre16-3 libqt5core5a
  libqt5dbus5 libqt5network5 libsbc1 libsdl-ttf2.0-0 libsdl2-2.0-0
  libsidplayfp4 libsmi2ldbl libspandsp2 libwacom-bin libwacom-common libwacom2
  libwayland-server0 libwireshark-data libwireshark11 libwiretap8 libwscodecs2
  libwsutil9 libxatracker2 libxcb-icccm4 libxcb-image0 libxcb-keysyms1
  libxcb-randr0 libxcb-render-util0 libxcb-xfixes0 libxcb-xinerama0
  libxcb-xkb1 libxfont2 libxkbcommon-x11-0 qttranslations5-l10n
  wireshark-common x11-apps x11-session-utils xfonts-100dpi xfonts-75dpi
  xfonts-base xfonts-scalable xinit xserver-common xserver-xorg-legacy
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  audacious audacious-plugins compton-conf libaudqt0 libegl-mesa0 libegl1
  libegl1-mesa libgbm1 libqgsttools-p1 libqt5gui5 libqt5multimedia5
  libqt5multimedia5-plugins libqt5multimediawidgets5 libqt5opengl5
  libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5x11extras5
  libwayland-egl1-mesa qt5-gtk-platformtheme virtualbox-5.2 wireshark
  wireshark-qt xorg xserver-xorg xserver-xorg-core xserver-xorg-input-all
  xserver-xorg-input-libinput xserver-xorg-input-wacom xserver-xorg-video-all
  xserver-xorg-video-amdgpu xserver-xorg-video-ati xserver-xorg-video-fbdev
  xserver-xorg-video-intel xserver-xorg-video-nouveau xserver-xorg-video-qxl
  xserver-xorg-video-radeon xserver-xorg-video-vesa xserver-xorg-video-vmware
The following packages will be DOWNGRADED:
  libdrm2
0 upgraded, 0 newly installed, 1 downgraded, 39 to remove and 0 not upgraded.
Need to get 36.2 kB of archives.
After this operation, 209 MB disk space will be freed.
Do you want to continue? [Y/n] 
Get:1 http://deb.debian.org/debian stretch/main amd64 libdrm2 amd64 2.4.74-1 [36.2 kB]
Fetched 36.2 kB in 0s (153 kB/s)
(Reading database ... 336865 files and directories currently installed.)
Removing audacious (3.7.2-1+b1) ...
Removing audacious-plugins:amd64 (3.7.2-2.1) ...
Removing compton-conf (0.2.1-2) ...
Removing libaudqt0:amd64 (3.7.2-1+b1) ...
Removing xorg (1:7.7+19) ...
Removing xserver-xorg (1:7.7+19) ...
Removing xserver-xorg-video-all (1:7.7+19) ...
Removing xserver-xorg-video-vmware (1:13.2.1-1+b1) ...
Removing xserver-xorg-video-vesa (1:2.3.4-1+b2) ...
Removing xserver-xorg-input-all (1:7.7+19) ...
Removing xserver-xorg-input-libinput (0.23.0-2) ...
Removing xserver-xorg-video-qxl (0.1.4+20161126git4d7160c-1) ...
Removing xserver-xorg-video-nouveau (1:1.0.13-3) ...
Removing xserver-xorg-input-wacom (0.34.0-1) ...
Removing virtualbox-5.2 (5.2.34-133893~Debian~stretch) ...
Removing libwayland-egl1-mesa:amd64 (18.2.8-2~bpo9+1) ...
Removing xserver-xorg-video-amdgpu (1.2.0-1+b1) ...
Removing libqt5multimedia5-plugins:amd64 (5.7.1~20161021-2) ...
Removing libqgsttools-p1:amd64 (5.7.1~20161021-2) ...
Removing wireshark (2.6.7-1~deb9u1) ...
Removing wireshark-qt (2.6.7-1~deb9u1) ...
Removing libqt5multimediawidgets5:amd64 (5.7.1~20161021-2) ...
Removing libqt5multimedia5:amd64 (5.7.1~20161021-2) ...
Removing libqt5opengl5:amd64 (5.7.1+dfsg-3+deb9u1) ...
Removing libqt5printsupport5:amd64 (5.7.1+dfsg-3+deb9u1) ...
Removing libqt5svg5:amd64 (5.7.1~20161021-2+b2) ...
Removing libqt5widgets5:amd64 (5.7.1+dfsg-3+deb9u1) ...
Removing libqt5x11extras5:amd64 (5.7.1~20161021-2) ...
Removing qt5-gtk-platformtheme:amd64 (5.7.1+dfsg-3+deb9u1) ...
Removing xserver-xorg-video-ati (1:7.8.0-1+b1) ...
Removing xserver-xorg-video-fbdev (1:0.4.4-1+b5) ...
Removing xserver-xorg-video-intel (2:2.99.917+git20161206-1) ...
Removing xserver-xorg-video-radeon (1:7.8.0-1+b1) ...
Removing xserver-xorg-core (2:1.19.2-1+deb9u5) ...
Removing libqt5gui5:amd64 (5.7.1+dfsg-3+deb9u1) ...
Removing libegl1-mesa:amd64 (18.2.8-2~bpo9+1) ...
Removing libegl1:amd64 (1.1.0-1~bpo9+1) ...
Removing libegl-mesa0:amd64 (18.2.8-2~bpo9+1) ...
Removing libgbm1:amd64 (18.2.8-2~bpo9+1) ...
dpkg: warning: downgrading libdrm2:amd64 from 2.4.95-1~bpo9+1 to 2.4.74-1
(Reading database ... 335466 files and directories currently installed.)
Preparing to unpack .../libdrm2_2.4.74-1_amd64.deb ...
Unpacking libdrm2:amd64 (2.4.74-1) over (2.4.95-1~bpo9+1) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Setting up libdrm2:amd64 (2.4.74-1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for shared-mime-info (1.8-1+deb9u1) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Processing triggers for glx-alternative-mesa (0.8.8~deb9u2) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/mesa-diverted because link group glx is broken
update-alternatives: warning: skip creation of /usr/lib/x86_64-linux-gnu/libEGL.so.1 because associated file /usr/lib/mesa-diverted/x86_64-linux-gnu/libEGL.so.1 (of link group glx) doesn't exist
Processing triggers for hicolor-icon-theme (0.15-1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...

好的,所以它删除了所有这些软件包,其中一些非常重要,而无需重新安装它们?当我在 history.log 中查找 apt 时,这一点得到了证实。

我想我会手动安装它们,希望它不会在此过程中升级 libdrm2 ...

# apt-get install audacious-plugins-data compton-conf-l10n libaudcore3 libaudgui3 libaudtag2 libc-ares2 libcddb2 libcue1 libdouble-conversion1 libdrm-common libevdev2 libfluidsynth1 libglvnd0 libguess1 libinput-bin libinput10 libmaxminddb0 libmms0 libmodplug1 libmtdev1 libneon27-gnutls libpcre16-3 libqt5core5a libqt5dbus5 libqt5network5 libsbc1 libsdl-ttf2.0-0 libsdl2-2.0-0 libsidplayfp4 libsmi2ldbl libspandsp2 libwacom-bin libwacom-common libwacom2 libwayland-server0 libwireshark-data libwireshark11 libwiretap8 libwscodecs2 libwsutil9 libxatracker2 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxfont2 libxkbcommon-x11-0 qttranslations5-l10n wireshark-common x11-apps x11-session-utils xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xinit xserver-common xserver-xorg-legacy

但是,现在我被告知这些已经是最新版本。

在这一点上,我不确定发生了什么。

无论如何,我现在可以安装 freeglut3-dev,它不再抱怨了。

我不确定我真的知道我在做什么,并且可能已经接近破坏我的系统。

我的来源.list:

deb http://deb.debian.org/debian/ stretch main contrib non-free
deb-src http://deb.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://deb.debian.org/debian/ stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian/ stretch-updates main contrib non-free

# Virtualbox
deb http://download.virtualbox.org/virtualbox/debian stretch contrib non-free
debian
  • 1 1 个回答
  • 1300 Views

1 个回答

  • Voted
  1. Best Answer
    Stephen Kitt
    2019-10-23T04:03:58+08:002019-10-23T04:03:58+08:00

    这是问题的根源:

    # apt-cache policy libdrm2
    libdrm2:
      Installed: 2.4.95-1~bpo9+1
      Candidate: 2.4.95-1~bpo9+1
      Version table:
     *** 2.4.95-1~bpo9+1 100
            100 /var/lib/dpkg/status
         2.4.74-1 500
            500 http://deb.debian.org/debian stretch/main amd64 Packages
    

    这表明您libdrm2在某个时候从 Stretch backports 安装,并且您的存储库中不再配置 backports。

    当你跑

    apt-get install libdrm2=2.4.74-1
    

    你要求apt-get降级libdrm2。在这种情况下,apt-get不会自行降级相关包;它验证生成的依赖关系,并删除不再满足依赖关系的任何包。在这种情况下,您从 backports 安装的其他软件包,并且依赖于libdrm2比 2.4.74 更新的软件包,将被删除:libegl1等等。依赖于这些的软件包也将被删除;这包括xserver-xorg-core. 该过程继续进行,直到没有任何软件包具有不满意的依赖关系...

    你没有破坏你的系统;这样做需要额外的确认。您apt-get install没有做任何特别有用的事情,因为您给了它现在可以自动删除的软件包列表;这些软件包仍然安装。要撤消删除,您应该安装已删除的软件包:

    The following packages will be REMOVED:
      audacious audacious-plugins compton-conf libaudqt0 libegl-mesa0 libegl1
      libegl1-mesa libgbm1 libqgsttools-p1 libqt5gui5 libqt5multimedia5
      libqt5multimedia5-plugins libqt5multimediawidgets5 libqt5opengl5
      libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5x11extras5
      libwayland-egl1-mesa qt5-gtk-platformtheme virtualbox-5.2 wireshark
      wireshark-qt xorg xserver-xorg xserver-xorg-core xserver-xorg-input-all
      xserver-xorg-input-libinput xserver-xorg-input-wacom xserver-xorg-video-all
      xserver-xorg-video-amdgpu xserver-xorg-video-ati xserver-xorg-video-fbdev
      xserver-xorg-video-intel xserver-xorg-video-nouveau xserver-xorg-video-qxl
      xserver-xorg-video-radeon xserver-xorg-video-vesa xserver-xorg-video-vmware
    
    • 4

相关问题

  • GRUB 配置以识别同一 Linux 发行版的不同桌面环境(安装)

  • astyle 不会更改源文件格式

  • 接收有关全新 Debian 的电子邮件

  • Debian Stretch:libgs_plugin_systemd-updates.so 中的 gnome-software 段错误

  • 如何在拼音输入法中输入ü?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve