loads of uninstallable dependencies on debian

Smorty [she/her]@lemmy.blahaj.zone to Linux@lemmy.ml – 20 points –

I installed Debain 12 about a month ago, and kept having difficulties with the package manager. It seems to lack any sort of sources in its default configuration, so that I had to manually add some which I saw online to the sources file. By default, the sources file only refered to some cd-rom thing, even though I installed the OS with a usb stick. Currently I am trying to install blender with apt, but as many times before, apt finds the program, but not the dependencies. The output I get from sudo apt install blender is this:

marty@MartyPC:~$ sudo apt install blender
[sudo] Passwort für marty: 
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Einige Pakete konnten nicht installiert werden. Das kann bedeuten, dass
Sie eine unmögliche Situation angefordert haben oder, wenn Sie die
Unstable-Distribution verwenden, dass einige erforderliche Pakete noch
nicht erstellt wurden oder Incoming noch nicht verlassen haben.
Die folgenden Informationen helfen Ihnen vielleicht, die Situation zu lösen:


Die folgenden Pakete haben unerfüllte Abhängigkeiten:
 blender : Hängt ab von: libavcodec58 (>= 7:4.0)
           Hängt ab von: libavdevice58 (>= 7:4.0) soll aber nicht installiert werden
           Hängt ab von: libavformat58 (>= 7:4.1) soll aber nicht installiert werden
           Hängt ab von: libboost-atomic1.67.0 ist aber nicht installierbar
           Hängt ab von: libboost-chrono1.67.0 ist aber nicht installierbar
           Hängt ab von: libboost-date-time1.67.0 ist aber nicht installierbar
           Hängt ab von: libboost-filesystem1.67.0 ist aber nicht installierbar
           Hängt ab von: libboost-iostreams1.67.0 ist aber nicht installierbar
           Hängt ab von: libboost-locale1.67.0 ist aber nicht installierbar
           Hängt ab von: libboost-regex1.67.0 (>= 1.67.0-10) ist aber nicht installierbar
           Hängt ab von: libboost-system1.67.0 ist aber nicht installierbar
           Hängt ab von: libboost-thread1.67.0 ist aber nicht installierbar
           Hängt ab von: libglew2.1 (>= 1.12.0) ist aber nicht installierbar
           Hängt ab von: libilmbase23 (>= 2.2.1) ist aber nicht installierbar
           Hängt ab von: libopencolorio1v5 (>= 1.1.0~dfsg0) ist aber nicht installierbar
           Hängt ab von: libopenexr23 soll aber nicht installiert werden
           Hängt ab von: libopenimageio2.0 soll aber nicht installiert werden
           Hängt ab von: libopenvdb5.2 ist aber nicht installierbar
           Hängt ab von: libpython3.7 (>= 3.7.0) soll aber nicht installiert werden
           Hängt ab von: libtbb2 (>= 2017~U7) ist aber nicht installierbar
E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.

Im very sorry for the german output (if anyone knows how to change only the terminal language to english, I would appreciate if they could tell me how to). It essentially says this:

Some packages cannot be installed. That can meean, that an impossible situation was requested, or that an unstable distro is used and that the required packages have not been created yet. The following information may help solve the problem:

These packages need unmet dependencies:
blender:
   needs libavcodec58 (>= 7:4.0)
   [...]

If anyone has suggestions for fixing this promblem, I would appreciate it very much if they could share their thoughts.

11

You are viewing a single comment

You have entries for different debian releases but no entry for the one you actually installed (bookworm). Change this to

deb https://deb.debian.org/debian/ bookworm main contrib non-free-firmware non-free
deb https://deb.debian.org/debian/ bookworm-updates main contrib non-free-firmware non-free
deb https://security.debian.org/debian-security bookworm-security main contrib non-free-firmware non-free

Then run apt update and apt dist-upgrade to update all packages that you installed from older repos. Then apt autoremove to remove packages that are not longer needed.

After that you may still have to downgrade packages installed from trixie repos or remove them if they are not in bookworm. To do this, edit your /etc/apt/preferences file (create it if it does not exist) and add

Package: *
Pin: release n=bookworm
Pin-Priority: 1001

Package: *
Pin: origin ""
Pin-Priority: -10

Then run apt dist-upgrade and apt autoremove again. When all packages are downgraded, remove these lines from /etc/apt/preferences.

For more details, refer to the documentation:

In some cases it can be easier to simply reinstall the OS avoiding mistakes that you did.

You might be able to fix it by picking the most recent of all the mixed releases and running a dist-upgrade. But this is absolutely not supported or tested. But a complete reinstall is certain to fix it.