this post was submitted on 27 Oct 2023
19 points (82.8% liked)

Linux

48208 readers
1349 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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.

all 9 comments
sorted by: hot top controversial new old
[–] bizdelnick@lemmy.ml 16 points 1 year ago

It's hard to guess what is wrong with your configuration. Show your sources.list.

To disable translation for commands you run in terminal, do export LANG=C.

[–] ChojinDSL@discuss.tchncs.de 15 points 1 year ago (1 children)

Well... Right off the bat, I can see what the problem is. You have totally mixed up entries for different releases of debian in there. It's a wonder it hasn't completely broken your system.

[–] Smorty@lemmy.blahaj.zone 3 points 1 year ago

It kinda has multiple times. I tried installing a Wayland version of gnome and that ended up nuking the Desktop multiple times. Then to fix it, I just ran this in a TTY: sudo apt remove gnome sudo apt install gnome And that fixed the desktop (even my wallpaper and shortcuts were back, wow).

And yes, I will update my sources to suit my OS.

[–] Smorty@lemmy.blahaj.zone 4 points 1 year ago (2 children)

In case it is needed, here is my current sources.list content:

# deb cdrom:[Official Debian GNU/Linux Live 12.1.0 gnome 2023-07-22T09:48:34Z]/ bookworm main non-free-fi>
# deb http://ftp.us.debian.org/debian stretch main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free

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

deb https://deb.debian.org/debian/ trixie main non-free contrib non-free-firmware
deb-src https://deb.debian.org/debian/ trixie main non-free contrib non-free-firmware

# deb https://dl.winehq.org/wine-builds/debian/ buster main
[–] bizdelnick@lemmy.ml 16 points 1 year ago* (last edited 1 year ago) (1 children)

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:

[–] bizdelnick@lemmy.ml 13 points 1 year ago (1 children)

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

[–] wmassingham@lemmy.world 5 points 1 year ago

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.

[–] yote_zip@pawb.social 11 points 1 year ago* (last edited 1 year ago)

You need to not be using buster/trixie/stretch in your sources first of all. switch all instances of buster, trixie, and stretch to bookworm, then do an apt update and try again.

This is what my sources.list looks like for reference (I have enabled non-free and non-free-firmware which you may or may not want, and I also have the backports repo enabled):

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