views:

479

answers:

7

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?

A: 

There are also many different text-editors, desktop-environments and so on. The different distributions share this only, because they provide all these programs.

But they have to decide for one package-manager. Different package-manager wouldn't know about software installed by another package-manager. So distributions decide for one or develop one themself, tailored to their specific needs.

Two very common package managers are RPM and apt, that are both used by different distributions.

Mnementh
+5  A: 

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.

Jouni K. Seppänen
pkg-comp link is down
Juliano
I can't blame him - a comparison like that is sure to invite flamewars. But the interesting content is actually still there in an xml file for the slightly more technically advanced readers to find. Though of course it can get dated as developers add new features to the various packaging formats.
Jouni K. Seppänen
A: 

Some do share a package manager. I've used Apt on several distributions. Some distros need something more specific to their philosophy. For example, Gentoo needs something that grabs source and compiles rather than just installing a binary.

tloach
+1  A: 

Historic Inertia.

Ali A
+3  A: 

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.

cms
+1  A: 

Fedora uses both APT and YUM now, they have a little blurb about it on their Wiki, when they started making Fedora they chose YUM because APT hadn't had any updates for a while, and they support APT now, but default to YUM because that is what the Anaconda installer uses.

Deinumite
A: 

In some cases it's simply that the makers of the distro prefer one package management system to another. The nice thing about Linux is choice and multiple package management systems mean more choice.