Why do Linux distros have different package managers?
I find this very strange because other software such as text editors, desktop environments and graphics software (Inkscape, Blender, GIMP) are shared among distributions. Why not have a common setup tool?
Like most things in the UNIX world where there are duplications of behaviour, it's a combination of many things, but mostly history, politics/religion, and the desire to build a better mousetrap / NiH syndrome. The existence of multiple system compononents that perform equivalent tasks is often praised as a useful feature, by open source proponents.
Broadly speaking you mostly need to worry about four flavours of package management system. You have the debian derived systems, like debian, ubuntu which use .deb
and the apt/dpkg family of management tools. You have the redhat derived systems which use the .rpm
format and the rpm / yum family of management tools. Feature wise these both are broadly equivalent, in my opinion.
The important thing is try and learn the toolset you're working with well, they're all well documented. Learn about how to check dependencies and verify package signatures and integrity, and find out what services a package provides, and conversely what package is responsible for a particular installed file or program, using the native package tools for your distribution of choice. Ideally learn the command line options to do this for yum and rpm and then dpkg and aptitude and you'll have most bases covered. Then use the GUI tools if you prefer.
I think the most important thing to remember is that it's generally a mistake to mix packages from different distributions or releases in the same system even if they use the same package format e.g. do not install debian .deb files on your ubuntu system, or SuSE rpm files on your Fedora system, unless you really understand what you're doing.
The other two flavours I mentioned are less mainstream, but I list them for completeness sake. These are
a) no package system outside of binary/source tarball a la classic slackware , and
b) source build tools modelled after BSD ports, a la classic gentoo.
Again, you don't want to be here, until you understand why you might want to, in my opinion.
Historical reasons. Similarly, you could ask why there are multiple companies providing similar services, when just one company could be more efficient overall.
See http://kitenet.net/~joey/pkg-comp/ for a comparison of different package formats from the viewpoint of a Debian developer. Also note that you can use a program called alien to install a package of one kind on other kinds of systems. It's not perfect, but it helps when a vendor delivers software in the "wrong" package format for your chosen distro.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With