Sonntag, 19. September 2021

Wie man unter Debian „E: Broken packages“ am einfachsten löst

Release-Upgrades von Debian GNU/Linux-Kisten sind immer so eine Sache. Bei der Migration von Stretch auf Bullseye stand ich vor folgendem Problem:

# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  apt apt-utils cpp gcc libmariadb-dev
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
# apt upgrade apt
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... 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:
 apt : Depends: libapt-pkg6.0 (>= 2.2.4) but it is not going to be installed
       Depends: libstdc++6 (>= 9) but 8.3.0-6 is to be installed
 apt-utils : Depends: apt (= 1.8.2.3) but 2.2.4 is to be installed
E: Broken packages

Wie ich endlich, nach all den Jahren herausgefunden habe, löst man solche Probleme am einfachsten mit dem Downgrade eines oder mehrerer Pakete. Dies, indem man apt-get install %paketname%=%versionsnummer% ausführt.

Welches Paket man im obigen Fall downgraden muss? Gar nicht so einfach. Irgendeinmal hatte ich es dann doch herausgefunden:

# apt-get install gcc-10-base=10.2.1-6

Danach flutschte apt-get upgrade durch.

Tags: , , ,
Labels: Linux

Kommentar erfassen