由于 libc6-dev,完全升级到 Debian 测试失败:中断:libgcc-8-dev

boo*_*ull 33 debian apt upgrade testing dist-upgrade

我刚刚切换到靶心(见下面的来源)

deb http://deb.debian.org/debian/ testing main contrib non-free
deb-src http://deb.debian.org/debian/ testing main contrib non-free

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

deb http://deb.debian.org/debian-security testing-security main
deb-src http://deb.debian.org/debian-security testing-security main

deb http://security.debian.org testing-security main contrib non-free
deb-src http://security.debian.org testing-security main contrib non-free
Run Code Online (Sandbox Code Playgroud)

更新和升级一切正常,但由于以下错误消息,完全升级失败:

The following packages have unmet dependencies:
 libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-6 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
Run Code Online (Sandbox Code Playgroud)

从我在 packages.debian.org 上看到的,Debian 测试应该有libgcc-8-dev: 8.4.0-4,所以我不明白为什么要安装旧版本。

我该如何解决这个问题,以完成靶心全面升级?

boo*_*ull 49

安装gcc-8-base( sudo apt install gcc-8-base) 似乎对我有用并为我解决了问题。

  • 答案是“不是”这个问题的解决方案。根据 [Debian Buster 发行说明](https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#upgrade-process),您应该为操作系统做好准备系统升级:`sudo apt update --without-new-pkgs` 然后您可以进行完整升级:`sudo apt full-upgrade` (4认同)
  • 甜的!我一直在尝试更新各个软件包但无济于事,但这确实解决了问题,谢谢! (3认同)
  • 安装这个会删除一堆软件包,例如“dolphin evince g++ g++-8 gcc-8-base:i386 gdm3 gnome gnome-contacts gnome-core gnome-session gnome-shell gnome-shell-extensions gnome-shell-pomodoro gnome-todo”为什么?甚至我的桌面“kde-plasma” (2认同)
  • 正如@Amith 所提到的,这个答案往往会导致不需要的包删除。现在 Buster -&gt; Bullseye 升级路径存在一个更深层次的问题,显然是由于 gcc 重命名了一些包以及当一个包提供另一个包时 apt 如何解决依赖关系。此处的信息:https://salsa.debian.org/rpavlik/gcc-10-compat(显然因为这个问题受到保护,我拥有其他 SO/SE 站点帐户的 100 声誉不足以添加顶级答案...) (2认同)

小智 9

如果它仍然不起作用,请尝试: apt-get install gcc-9-base

  • 为我工作。现在我在想 gcc-10 是否也可以工作? (2认同)

Bre*_*nny 8

在尝试了其他所有方法后,这对我有用:

apt-get 删除 libgcc-8-dev