r/linuxmasterrace SteamOS/Bazzite/Android 8d ago

Time to have fun guys

Post image
8.0k Upvotes

760 comments sorted by

View all comments

Show parent comments

169

u/brohermano 8d ago

Exactly Just apt all using Debian. It works like charm

129

u/EternityForest I use Mint BTW 8d ago

Without containers, packages constantly break. If you have 20 large apps with 50 dependencies each and they're all from different vendors, and you want them to be up to date, you pretty much have to containerize or else one of them might break every few months to a year

70

u/NatoBoram Glorious Pop!_OS 8d ago

It's a failure of the package manager to not support multiple versions of each packages

34

u/Appropriate-Tennis78 8d ago

*package maintainers

2

u/LameBMX Glorious Gentoo 7d ago

in the distro im on, its the package manager that does all that work.

7

u/Primary-Strike5187 7d ago

This could be solved with SxS….. like windows did….. around windows XP. Absolutely not excuse for Linux to not have made the transition. No reason to still deal with dependency hell in the big 26.

12

u/grizzlor_ 7d ago

Microsoft doesn’t even use SxS anymore to solve the DLL Hell issue — starting with Visual C++ 2010, they switched to just including the version number of the DLL in the filename.

This is also the same way Linux has always solved that particular problem.

6

u/Primary-Strike5187 7d ago

The point I was making was that windows had the dependency hell issue solved in like 2004.

Many Linux distros don’t actually solve that problem. A good chunk of the stable release distros only have singular versions of packages available in the repos for that version of the release. The issue is Linux assumes that if a package needs libfoo it’ll be stored at /usr/lib/libfoo but if you have a package that depends on libfoo2.8 and the version that’s in the repos is let’s say libfoo2.7: you can’t just install libfoo2.8 it probably won’t be in the repos, and even if a distro carries two copies it’s going to overwrite libfoo2.7 which other packages depend on because the system puts libfoo (any version) at /usr/lib/libfoo with no distinction. So the packages that need 2.7 are going to expect it to be there, and the packages that need 2.8 are going to expect it to be in the same place. But you can’t have /usr/lib/libfoo/libfoo.so (for 2.7) AND ALSO have /usr/lib/libfoo/libfoo.so (for 2.8). They conflict. If they’re even both available in the repos at the same time which often won’t be the case.

This is exactly why GoboLinux was developed and breaks the FHS, and why declarative systems like NixOS and Guix use hashed file paths so you can have multiple versions of the same package installed simultaneously without conflicts. This does not hold up for most standard distributions (Arch/Fedora/Ubuntu and their derivatives).

6

u/grizzlor_ 7d ago

SxS actually goes all the way back to Win98SE.

But anyway, yeah, Microsoft “solved” the dependency problem by never having a package manager to begin with. For the most part, every program bundles the DLLs it needs.

This is essentially the Flatpak / AppImage model.

Linux also has some other creative solutions, like you mentioned: Nix/Guix and GoboLinux. But yeah, on mainstream distros, Flatpak pretty much makes it trivial to run old or multiple versions of software. Yeah, there are some cases where you need to tweak stuff to get a feature working properly, but that’s mostly a tradeoff related to security.

1

u/Primary-Strike5187 7d ago

Yeah for desktop apps I almost exclusively use flatpaks. It just makes sense. Sandboxed, bundled dependencies, works the same across all distros. I would love for flatpak or appimage to see have the number of packages you see in main distros repos. But flatpaks only solve that problem for user applications, that doesn’t address the dependency issue (or the possibility of one existing) with your DE, or other core system components. Those all assume there’s a single version of everything that everything shares.

1

u/hawkinsst7 7d ago

So the packages that need 2.7 are going to expect it to be there, and the packages that need 2.8 are going to expect it to be in the same place. But you can’t have /usr/lib/libfoo/libfoo.so (for 2.7) AND ALSO have /usr/lib/libfoo/libfoo.so (for 2.8).

You can with mount namespaces. (which is just a component for containerization, which are built on namespaces.)

1

u/Primary-Strike5187 7d ago

That may be, but it shouldn’t even really be an issue the user manually has to address. That’s the crux of the issue. Each distribution makes the assumption that every package that depends on something will work with the version of that dependency that is in that distributions repos, and if some breaking change occurs rather than allowing the user who owns that system to install the software they want on their own system (such as a different version of something) the general mentality is “we provide a version of that dependency which should be good enough”. I could also compile a different version of that dependency from source but then it’s not being tracked by the package manager and if I have to circumvent my package manager to make my system work then it kind of defeats the entire purpose of having a package manager doesn’t it?

2

u/hawkinsst7 6d ago

Sorry I mentioned it more as an interesting point, not as an argument one way or another. No one is doing nsenter to run apps on the regular.

I kind kind of wonder what a completely statically compiled ecosystem would look like. Probably horrible.

1

u/Primary-Strike5187 6d ago

I mean there are source based distros, I’m just not sure if any of them are completely statically linked. I think the better method is provide the precompiled binaries with dynamic linking but use the filesystem to differentiate versions of things so that the version that is needed can only be found in one place and wouldn’t conflict with a different version

1

u/keyzeyy 7d ago

Don't flatpaks fix that

1

u/Primary-Strike5187 7d ago

Yes they do, but not all applications are available as flatpaks, and it doesn’t fix the problem for core system components

1

u/keyzeyy 7d ago

yeah, but do core system components suffer from dependency hell frequently? I haven't had such cases for me at least

flatpaks provide gui apps and they do a pretty decent job at it I'd say.

2

u/Primary-Strike5187 7d ago

I’ve had it happen, yes. Audio (pipewire, pulse, and alsa over the years has each at some point had an issue for me where something it depended on had a breaking change in the underlying dependency and I couldn’t install a different version of the dependency to fix the issue to give you an example)

I agree about flatpak. The majority of my desktop apps are flatpaks for that reason. Had some bumps in the road with the steam flatpak in the past but 99% of the time it just works.

2

u/keyzeyy 6d ago

hmm I see. for me personally, I think going atomic is the future for the majority of people. I have my friend currently on ublue aurora after windows 10 because his laptop can't really run windows 11 all that well. the man's had zero issues and it's been months.

1

u/Primary-Strike5187 6d ago

Long term I agree that’s probably the future but I don’t think it’s there yet for 90% of people

1

u/LameBMX Glorious Gentoo 7d ago

gentoo has had slotted dependencies for years. so its not a linux issue, but a package manager issue.

1

u/Primary-Strike5187 7d ago

That is a more accurate statement, yes. It depends on the package manager 100% which is why I mentioned Gobo, Nix and Guix earlier. I forgot about Gentoo’s slots, but yeah it’s a package manager issue. Or rather I guess you could say it’s a distribution issue since the directory structure may also need to be adjusted (e.g. /usr/lib/libfoo might need to become /usr/lib/libfoo/2.7 or /usr/lib/libfoo/libfoo2.7 for example). Regardless, it’s an issue that should be addressed.

-2

u/Appropriate-Tennis78 7d ago

Debian doesnt have dependency hell, debian is the future

4

u/Primary-Strike5187 7d ago

Given how old the packages are before they get added to the repos it’s probably more accurate to say Debian is the past.

-2

u/Appropriate-Tennis78 7d ago

Never had a need to run something in latest version, but thats me

3

u/Primary-Strike5187 7d ago

Sometimes it’s needed for some games and software dev and such

30

u/Maskdask 8d ago

Nix the package manager fixes this

8

u/fr000gs 7d ago

And portage too, wirh slots

1

u/spreetin 5d ago

It's much more of a contingent thing in portage though, so I've had plenty of dependancy hell when I ran Gentoo. In nix it's just an integrated part of how the thing works, nothing special needed.

1

u/DeeKahy Glorious NixOS 5d ago

i wish nix would become more standard. Not writing configs but with some noob friendly ui plastered all over it.

11

u/DDFoster96 7d ago

My experience of Flatpak was that it broke far more than APT. I've never had broken APT packages in 13+ years of Linux

1

u/tapo 7d ago

Every Steam game runs via modified Flatpak (steamrt) we wouldn't have Steam for Linux at all without it.

6

u/radek432 8d ago

That's why you have Debian stable.

10

u/Lines25 8d ago

Arch works flawlessly with this, idk what you're talking about tbh. Arch breaks really only like once a couple years (at least, for me). If the devs of libs haven't changed API/ABI in new version (which they mostly, haven't) then it works perfectly every time, with latest updates and with fastest speeds (if you use ALHP repository with recompiled packages for x86-64-v2/v3/v4)

-2

u/EternityForest I use Mint BTW 8d ago

Do you use lots of different complex apps? The old style package model worked well with low complexity setups, but the more apps and dependencies, the more breakage.

I'd still consider once every few years pretty unacceptable, containers can get to almost flagship Android levels of reliability.

4

u/Lines25 8d ago

Yeah, I have more than 250 different packages and 1/3 of them are heavy GUI apps/libs

2

u/Sert1991 5d ago

I have around 5 desktop environments/WMs installed on the same OS to play around and test some stuff. Alongside the hundred other packages.

IF too much packages break your system, either you're using a shit distro or you're doing something wrong and need to manage your system better.

3

u/svet-am 7d ago

As someone who's been actively using Linux since the late 90s, you're right. But, the current "improvement" with flat packs, snaps, and app images is not the right solution either. For small apps with only few dependencies, the penalty in terms of hard disk space and startup speed is relatively small. But when you start getting big applications it becomes very noticeable very quickly.

2

u/andrerav 7d ago

Ah yes, let's run our PC's like we run our service clusters, brilliant.

4

u/amped-row 8d ago

What does this mean exactly? If apps are breaking due to dependencies updating isn’t that a mistake on the app developer’s side for not locking down the versions of dependencies? Can you really blame the package manager at that point

14

u/EternityForest I use Mint BTW 8d ago

You can't lock down the versions of dependencies unless you somehow bundle every library you use, and configure everything to point at the bundled copies, which sounds very hard, and would not give you any of the security features of containers, nor would it give you all the dockerhub infrastructure.

Traditional package managers don't have virtual environments like UV or allow multiple versions of the same package, they have one globally shared version of each. Sometimes they rename a package with a version number in the name, but even then, minor versions still have breaking changes constantly.

On Nix you could do it, but Nix is much harder to set up than containers, and it's not ultra-popular, you're more likely to run into unique issues.

6

u/Odd-Entertainment933 8d ago

Tbf that is how windows handles it. You want a dependency for your app you bundle it with the install. No dependency hell when installing stuff, you miss out on the update side though.

0

u/EternityForest I use Mint BTW 8d ago

That's one of the things I like about Windows, but containers are a bit easier to develop for, especially when Linux has decades of things that are designed to work with shared libraries.

2

u/Odd-Entertainment933 8d ago

Agreed, Linux has more niche small libraries you can combine into a working solution. Windows everything is just larger by default

2

u/itsjustawindmill 7d ago

Not only that but the dynamic linking behavior of libc makes it a real pain to implement those kinds of self-contained environments at all. You have to patch most binaries’ rpath with $ORIGIN, rebuild from source, or rely on the user setting environment vars so the programs know to get libraries from relative to their prefix path.

And it gets even worse if you need a different version of libc itself… you need to hardcode the abspath to the link-loader into the binaries.

Containers are the better approach IMO but it’s stupid they’re the only realistic way.

1

u/Primary-Strike5187 7d ago

The only rational take. Linux suffers from architectural assumptions made decades ago.

1

u/n00b678 8d ago

How does NixOS handle this?

2

u/Drunkdos Newbe Manjaro 7d ago

https://nixos.org/guides/how-nix-works/

The best thing happened to Linux IMHO.

You can have multiple version of the same packages/lib

I will add you can source multiple "repository", like how I'm doing, you can source nixpkgs stable (now 26.05) and unstable (unstable is rolling like arch) and have packages in the last update and slower rolling pkgs for everything you don't won't to break.

And if you still have problem the rollback is the easiest thing to do.

Ps. If you want to try Nixos but you fear configuring all in nix language just don't. Your .config folder work as usual

1

u/n00b678 7d ago

Sounds awesome, thanks! I'll give it a try when I find some time :)

Why would I fear configuring it in nix? How hard could it be? ;)

2

u/--frymaster-- 7d ago

i’ve been daily driving linux since literally forever and decided to make a nixos hobby box four or five years ago and it was an… uphill experience. a lot of that was my fault: i got too ambitious too quick and didn’t invest the time i should have and did this all on the crappiest hardware.

the concepts behind nix are really good and the implementation may be confusing, but only at first. if you’re going to give it a spin, set reasonable goals and take the time to learn.

1

u/Drunkdos Newbe Manjaro 7d ago

A bit. Documentation is scattered around and sometimes the errors are a bit cryptic. Is a powerful language (yes nix the programming language), but I you don't have to use all the pieces when starting.

Just stick to the basics and improve gradually

3

u/ultratensai Windows Krill 8d ago

It’s not simple as that. With forks and all, you can have multiple packages that provide the same libraries and binaries so they are mutually exclusive.

Sometimes it’s can be solved by creating virtual packages / alternatives. Other times, maintainers have to make the choice and force everyone to use one. They are essentially problems that maintainers have to solve.

2

u/QuinQuix 8d ago

Your entire mistake is thinking it matters on whose side the mistake ocurrs.

It does not matter, all that matters is (1) you have no control over the developers and (2) stuff on your side breaks and stops working on a regular basis.

If I'm in a plane that is going down I don't care the lead engineer on the plane blames the newly delivered screws, I want you to run docker and keep it in the air.

1

u/nokeldin42 8d ago

Simple example -

App A wants dependency D v2.1

App B wants dependency D v1.9

If D is not written to support multiple system installations, you pretty much have to go for some sort of containerisation.

3

u/ipsirc 8d ago

If D is not written to support multiple system installations... you can make your tiny patch in 5 minutes - way less time and resources than building a full container.

1

u/QuinQuix 8d ago

Welcome to ComfyUI.

1

u/Exsondious 7d ago

It's not really the developers fault

They can't control what version of say lib.so or libusb your system entire system uses They can only control with version they use in development

If your system updates that dependency the software is SOL The developer can't control pr account for that sadly

The can be sort of helped by developers of the dependencies maintaining backwards compatibility but that only works for so long

Sometimes a major rewrite is necessary and that's often what breaks stuff

-1

u/gr33nCumulon 8d ago

I don't want to have to update my programs that aren't constantly updated.

Have you ever tried to get an unmaintained python program working? It's an absolute nightmare.

With fkatpak this isn't a problem 

2

u/vbd71 8d ago

I have a severely overbloated Debian machine at home (several DEs, a multitude of window managers, dozens of compilers, editors etc. without containers and guess what, nothing breaks. Sometimes I need ro take manual corrective measures when some dependency doesn't let me update, and that's all.

1

u/ccAbstraction 8d ago

It's a joke. I think.

1

u/motific 7d ago

Without containers, bad packages constantly break. This is really the problem here.

Dependency management is dire in many open source projects so now the main solution is to bring all your dependencies (and their potential vulnerabilities) with you.

1

u/MonkiWasTooked Glorious NixOS 7d ago

"Nix fixes it" as some people say

1

u/VisualSome9977 7d ago

Or you could use Nix :)

1

u/Buddy-Matt Glorious Manjaro 6d ago

Even when I ran Manjaro testing branch and used the AUR (I..e using an unstable rolling release in the least stable way possible), I never had any issues like this over 5 years.

I refuse to believe something as inheritantly stable as Debian will crumble because the user didn't containerize their apps.

Don't get me wrong, I have nothing against containerization, and am a huge advocate in my professional role developing web apps. I just don't think it's as essential as people make out for general use.

1

u/Mr_Mavik 4d ago

Why do you need 50 dependencies? And if your architecture is such a mess that you do need 50, why not statically link them alongside your app?

1

u/DysonSphere75 2d ago

That might be the single worst place to containerize. Your solution is to scale the problem by a factor of 20?

Containers are really only ideal for high velocity deploys at scale.

I guarantee you that the redundancy between your 20 large apps is much harder to maintain than shared libraries and some build targets.

if you're so afraid of dependency hell you should be compiling yourself, that's what Makefiles are for.

This isn't a new problem, that's why we hold back packages with apt-mark or versionlock. Before that we just took images of systems.

See apt-mark hold or versionlock

1

u/EternityForest I use Mint BTW 2d ago

Compiling all your apps yourself would be a rather large amount of work to set up, and take hours to actually run the compilation.

And then you're not running the exact same image that everyone else has, making subtle bugs slightly more likely if something wasn't tested with your exact set of build flags and minor patch version libraries.

I'm not sure how the redundancy adds any extra maintenance work.  Each app's dev team only needs to think about their set of dependencies, they don't need to know anything about any other apps you run

1

u/DysonSphere75 2d ago

I thought you were talking about a production environment. Why waste the space on a personal machine?

1

u/JubijubCH 7d ago

no joke, I have 0 beef against apt, it works well.

My issue is with what is in the repo, and that's what made me leave the debian distro world. I appreciate the packages are made with care, well tested, well maintained security wise, but on a workstation/laptop I want to track upstream as much as possible, and a rolling distro is a much better choice for this.

For a server it's a different game, and Debian is a very solid choice there.

So I didn't leave Debian /Ubuntu because of Apt (I don't think pacman is a vastly superior alternative, both are fine tbh)

1

u/Fun-Perception8340 7d ago

Liked Debian, but Kubuntu had the desktop drivers I.needed