1

I can't do this update and run into this error:

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.

This was for regular (not raspbian) debian-testing back in 2020 also the case: Full-upgrade to Debian testing fails due to libc6-dev : Breaks: libgcc-8-dev

Applying the solutions offered there will however break raspbian into an unusable state.

Either gnu utils are removed or libc is, as apt is confused enough to think they're incompatible because of a rename to a libgcc or libc component. Another root cause: Apt prefers 'same name' package over 'newer package that indicates it provides the same library'.

Provide guidance as to how to update raspberry debian without destroying your system.

2
  • I guess I didn't reword it as a question enough? It's very impotant though. There's a bunch of advice (including on SO sites) on how to do this in a terrible way that bricks your systems. As a new user I don't have the privilege or connections to get things fixed. I'd like experienced users to search out and fix the bad advice. It's not like clearing your root drive but not far off. Commented Dec 19, 2024 at 14:13
  • thanks for the reformulation and restructuring! Commented Dec 19, 2024 at 15:37

1 Answer 1

1

Cause: Underlying rename of libgcc-1 to libgcc-s1. A 'compat' package was provided but removed from debian 11 due to it no longer needing that: gcc was updated to version 9 where this isn't a problem anymore; it'll automatically pull the 's1' version there because gcc-9 only ever has dependencies written using the newer notation.

However, this upgrade is broken on raspberry-pi. The raspberry pi version of debian (raspbian) did not delete/remove gcc-8 so the bug remains there (it's not fixed, but no longer happens to occur, for the normal debian).

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=972820

https://salsa.debian.org/rpavlik/gcc-10-compat

https://packages.debian.org/bullseye/libgcc-s1

https://forums.debian.net/viewtopic.php?t=152931

! Warning !

most advice you see posted about this on the internet is dead wrong! Do not attempt to uninstall libgcc-8. If you do follow this advice, you'll end up breaking your system, because you will end up either without libc (breaks everything, obviously), or crucial tools like awk (depends on libgcc, needed for python build scripts, on which half the system depends). Apt or Apt-get are confused by this name change and will erroneously prefer an older lib when told to update, breaking a bunch of compatibilities.

Apt will try to reason its way out of the tangled mess this creates on some of the lowest level libraries in the system (the C STL). Everything will break, including apt itself, sometimes leaving you with a brick.

The best advice for now is to not update from buster to bullseye at all. Reinstall.

======================

Tenative solution to explore

The following is an experimental method, cobbled together. It'll still break packages, but does not seem to break core systems. It's not a full solution. One exists, but has disappeared from the internet (create a dummy package). I can't find it anymore, because SUSE removed or moved it without telling visitors where it is, and the person that wrote it has not (yet) contacted me back.

The real solution involves (re)creating a proper dummy package somehow. Somehow is big here, debian package format is... complex. I do not have the ability to do so.

sudo bash 


# Still breaks things, but hopefully less things. 
# Check and re-install (if needed) any non-default software you have on your rPi. 

apt-get update
apt-get upgrade 
apt-get -y install zstd
sed -i 's/buster/bullseye/g' /etc/apt/sources.list 
sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/raspi.list
apt-get update
apt-get -y install libgcc-s1 
apt full-upgrade libgcc1- 
apt-mark auto libgcc-s1
apt-mark auto zstd
3
  • SD cards are cheap enough. Get another card and install the latest PiOS. Take the opportunity to upgrade your other apps and packages. Finally, copy over your data. Commented Dec 20, 2024 at 16:18
  • Why can you not do a dist-upgrade as described here? Commented Dec 20, 2024 at 21:38
  • @eyoung100 because libgcc-1 has been renamed to libgcc-s1 which confuses apt into thinking the newer package is older/less desired than the old one. Because this is stuff to do with low level libraries, it will break your entire system if you let apt figure things out. Note that you will only see this problem if you've installed package(s) that depends on libgcc. A plain rPi can be updated by the usual method. Commented Jan 6 at 12:45

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.