29

I know every distro has its own package manager, some of them share the same package manager, you can even install other package managers.

Besides the source there getting the content from, the formatting of the download and compilation phases, and maybe even a specific programming language; I still can't wrap my head around why there need to be so many?

What rule says that every distro needs its own package and manager to install any package?

top 7 comments
sorted by: hot top controversial new old
[-] Max_P@lemmy.max-p.me 8 points 1 year ago

What rule says that every distro needs its own package and manager to install any package?

There isn't, it just happens that usually when you have ideas for a new distro to the point where you don't want to fork from an existing one, you're also typically not happy with how the packages are handled/built/versioned or whatever, so you end up making your own packages. Maybe you have an idea to make it different, and before you know it, you end up with a brand new package manager as well. Sometimes you want it to be simpler, maybe you're trying to avoid Debian's dependency hell and you end up creating pacman. Maybe you're targetting routers with 8MB of flash and you come up with opkg to keep it absolutely tiny.

Then there's things like Nix/NixOS where they're like, what if we do everything completely differently?

and maybe even a specific programming language

This one's a bit weird. Historically, that was left to the distributions to provide you with libraries, but as things keep moving it becomes increasingly complicated. On Debian, you can install a whole bunch of Python/Ruby/NodeJS libraries with apt, but because they're tied to the OS version, they can quickly become outdated. And really that only works on Debian, or Linux distributions. There's no such things on Windows and macOS. Supporting so many potential versions of your dependencies can quickly become a nightmare for developers just trying to get an app out. So typically there's always a way to bring your own dependencies as the official support environment. Distros can still decide to do otherwise if they wish, but at least there's a known good environment.

So each programming language tend to also have its own package manager so that it's uniform across the ecosystem, so that when you try to run a NodeJS app, on Windows, you do it about the same way as you would on Linux. These typically install the dependencies in the project's folder, so they're fully independent of the system ones which could be too old, too new, patched in incompatible ways. It's a bit like a sandbox for your project.

Ultimately, it's organic growth and people preferring some things over the others, or people experimenting with different things and it takes off. That's the freedom of open-source, you can achieve things in many different ways based on whatever you prefer. If you want to avoid pip and just install python3-* packages for your personal scripts, power to you.

[-] HeckGazer@lemmy.world 7 points 1 year ago
[-] masterofn001@lemmy.ca 3 points 1 year ago* (last edited 1 year ago)

I don't mind the package manager differences. What i have started to find annoying is different languages or sites requiring their own installers. Like pip or npm or git etc.

I've only ever used debian/ubuntu linux versions and there is some differences, but between dpkg and aptitude/apt-get/apt, it isn't too much to deal with.

And some package manager have been designed ground up to work better with a certain build.

I hear arches manager is super fast. But i'm good with apt.

It's all choice.

[-] fubo@lemmy.world 8 points 1 year ago

Your OS's own scripts use Python. So it installs Python by default. But the version of Python that it needs for those scripts, isn't necessarily the same one that you want to use as a developer. Developers often want to run brand-new versions of open-source software, but the OS depends on stable versions of that same software.

The current solution is to just completely decouple the two. Your OS's Python libraries are separate from the Python libraries you're using as a developer. That way, you can update the latter to whatever unstable version you want, while being confident that you're not going to break your OS.

[-] aDogCalledSpot@lemmy.zip 2 points 1 year ago

Aside from the technical problems you mentioned, it also solves the convenience problem of how to distribute libraries. C/C++ is really bad here because they dont have an integrated management tool. If you want to distribute over Linux package managers, then you will have to package it for every distro, paying attention to best practices and figuring out your dependencies for each one, you'll also have to put it on the VS package repo for developers using Windows and possibly also support a Windows installer (and uninstaller) for those that dont use VS.

The alternative is to upload to a single repo and be done.

[-] masterofn001@lemmy.ca 1 points 1 year ago

I've found that certain libraries i need to compile come with their own libraries and npm packaged and i end up with several hundred mb of bloat and 12 versions of npm and libraries just to try to install some package.

Installing a lot of things from github can be more of a pain than it's worth.

Especially the first time. When you don't know that there are now different npm instances on your system and you try to install or update something and you affect your entire system instead of the package directory.

Npm is not user friendly imho.

[-] WontonSoup@lemmy.world 3 points 1 year ago

I guess maybe the thought with pip and npm is they’re very specialized and the others are much more general. Why bloat a package manager with repositories that many will never need when you can download a specialized one for a specific need. No reason to even have access to npm if you don’t code in js or same with pip and python.

That said a way to add those repositories to other package managers would be nice and maybe possible. I’ve never really researched it.

But it’s like anything else, get people into your ecosystem rather than someone else’s

load more comments
view more: next ›
this post was submitted on 19 Jul 2023
29 points (96.8% liked)

Explain Like I'm Five

14249 readers
40 users here now

Simplifying Complexity, One Answer at a Time!

Rules

  1. Be respectful and inclusive.
  2. No harassment, hate speech, or trolling.
  3. Engage in constructive discussions.
  4. Share relevant content.
  5. Follow guidelines and moderators' instructions.
  6. Use appropriate language and tone.
  7. Report violations.
  8. Foster a continuous learning environment.

founded 1 year ago
MODERATORS