68

I've just switched to bullseye (see sources below)

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

The update and upgrade went fine, but full-upgrade fails due to the following error message:

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.

From what I see on the packages.debian.org, Debian testing should have libgcc-8-dev: 8.4.0-4, so I don't see why an older version is to be installed.

How can I fix this, to finalize the bullseye full-upgrade?

boolean.is.null
  • 2,413
  • 6
  • 18
  • 23
  • https://unix.stackexchange.com/questions/602827/full-upgrade-to-debian-testing-fails-due-to-libc6-dev-breaks-libgcc-8-dev/603748#603748?newreg=64f9bae058c54437b82228b4a27633df – Anonymous Physicist Oct 30 '20 at 07:16
  • There's another (a new?) bug with the same symptoms but not solvable using the accepted answer: see https://superuser.com/a/1607419/100450 – Ryan Pavlik Dec 04 '20 at 20:44
  • I reported the issue to Debian maintainers: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=981424 . I am leaving a comment here as I do not have enough reputation points to post an answer. – Kamaraju Kusumanchi Jan 30 '21 at 22:04

4 Answers4

97

Installing gcc-8-base (sudo apt install gcc-8-base) appeared to do the trick for me and fix the problem for me.

boolean.is.null
  • 2,413
  • 6
  • 18
  • 23
  • 3
    sweet! I've been going through trying to update the individual packages to no avail, this did the trick though thanks! – flux9998 Jun 17 '20 at 22:35
  • Right now this would even remove apt, so not a good idea. Sadly this isn't a planned transition (https://release.debian.org/transitions/). – MKesper Aug 25 '20 at 06:47
  • I've tried installing gcc-8-base and then I got another error on mutter. So I've installed all three at once "sudo apt install gcc-8-base mutter libmpx2". For more information (https://forums.kali.org/showthread.php?49704-Troubleshooting-Kali-apt-get-upgrade) – Tosh Oct 05 '20 at 15:59
  • 2
    Installing this removes a bunch of packages like `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` Why? Even my desktop `kde-plasma` – Amith Oct 22 '20 at 10:01
  • 1
    Definitely seems to have worked for me. Thanks! – John Smith Dec 30 '20 at 06:48
  • 3
    This answer tends to cause unwanted package removals, as @Amith mentions. There's a deeper issue with the buster -> bullseye upgrade path right now, apparently due to gcc renaming some packages and how apt resolves dependencies when a package `provide`s another. Info here: https://salsa.debian.org/rpavlik/gcc-10-compat (Apparently because this question is protected, my 100 reputation from having other SO/SE site accounts isn't enough to add a top-level answer...) – Laogeodritt Jan 05 '21 at 11:04
  • 2
    The answer is *not* the solution to this issue. According to the [Debian Buster release notes](https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#upgrade-process) you should prepare for the operating system minimal system upgrade: `sudo apt upgrade --without-new-pkgs` and then you can do a full upgrade: `sudo apt full-upgrade` – justinhartman May 07 '22 at 20:59
  • The command `sudo apt upgrade --without-new-pkgs` is what caused this mess to begin with. – user6856 Apr 26 '23 at 01:12
10

If it still does not work try: apt-get install gcc-9-base

TPS
  • 2,483
  • 5
  • 27
  • 45
OldS
  • 101
  • 2
7

This worked for me after trying everything else:

apt-get remove libgcc-8-dev

-1

@Laogeodritt mentioned this in one of the comments but I decided to post an answer because it is easier to find. The only procedure that worked for me:

echo "deb http://download.opensuse.org/repositories/home:/rpavlik:/bullseye-fix/Debian_Testing/ ./" | sudo tee /etc/apt/sources.list.d/bullseye-upgrade-fix.list
curl http://download.opensuse.org/repositories/home:/rpavlik:/bullseye-fix/Debian_Testing/Release.key | sudo tee /etc/apt/trusted.gpg.d/bullseye-upgrade-fix.asc
sudo apt update

This adds repositories with transitional packages available named libgcc1, etc. that depend on their renamed equivalents in bullseye. After this you can run dist-upgrade or full-upgrade.

Don't forget to remove the repositories after you reboot:

sudo rm /etc/apt/sources.list.d/bullseye-upgrade-fix.list
sudo rm /etc/apt/trusted.gpg.d/bullseye-upgrade-fix.asc`

Source: [1]: https://salsa.debian.org/rpavlik/gcc-10-compat

Jakob Kenda
  • 151
  • 4