2017-10-26 21:20:01 +00:00
|
|
|
|
= Package management system
|
2023-08-19 20:33:28 +00:00
|
|
|
|
Caleb McKee ; Otto Urpelainen; Ben Cotton
|
|
|
|
|
:revnumber: unspecified
|
|
|
|
|
:revdate: 2022-05-04
|
|
|
|
|
:category: Administration
|
|
|
|
|
:tags: How-to
|
|
|
|
|
// :page-aliases:
|
|
|
|
|
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
[[package-management-system]]
|
|
|
|
|
Package Management System
|
|
|
|
|
-------------------------
|
|
|
|
|
|
|
|
|
|
[[introduction]]
|
|
|
|
|
Introduction
|
|
|
|
|
~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
Fedora is a distribution that uses a package management system. This
|
2021-02-02 11:30:52 +00:00
|
|
|
|
system is based on https://rpm.org[rpm] , the RPM Package Manager, with
|
2017-10-26 21:20:01 +00:00
|
|
|
|
several higher level tools built on top of it, most notably
|
|
|
|
|
https://www.freedesktop.org/software/PackageKit/[PackageKit] (default
|
2022-05-04 18:03:02 +00:00
|
|
|
|
gui) and xref:dnf.adoc[DNF].
|
|
|
|
|
GNOME Software is another GUI package manager.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
[[advantages-of-package-management-systems]]
|
|
|
|
|
Advantages of package management systems
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
Package management systems have many advantages:
|
|
|
|
|
|
2020-04-18 21:27:08 +00:00
|
|
|
|
* It's easy to query what version of a package is installed or available.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
2020-04-18 21:27:08 +00:00
|
|
|
|
* It's easy to remove a package entirely, making sure all its files are gone.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
* It's easy to verify the integrity of the packages files, so you can
|
2020-04-18 21:27:08 +00:00
|
|
|
|
see if it's been corrupted or tampered with.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
* It's easy to upgrade a package by installing the new version and
|
2020-04-18 21:27:08 +00:00
|
|
|
|
removing all the old versions files. This will make sure not to leave
|
|
|
|
|
any lingering files from the old package around to confuse or break
|
|
|
|
|
things.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
* It's easy to see what packages require or provide things that other
|
2020-04-18 21:27:08 +00:00
|
|
|
|
packages provide or require, so you can be sure to have the needed items
|
|
|
|
|
for the package to function correctly.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
* It's easy to install or remove groups of packages.
|
|
|
|
|
|
|
|
|
|
* In many cases it's possible to downgrade back to a previous version of
|
2020-04-18 21:27:08 +00:00
|
|
|
|
a package, for example when a new version has a bug.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
[[disadvantages-of-package-management-systems]]
|
|
|
|
|
Disadvantages of package management systems
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
* You are restricted to either using the versions of the package that
|
2020-04-18 21:27:08 +00:00
|
|
|
|
are available or having to make your own package if you need a different
|
|
|
|
|
version.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
[[why-mixing-source-installs-and-packages-is-a-bad-idea]]
|
|
|
|
|
Why mixing source installs and packages is a bad idea
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
Package management systems have no way to query or note when you bypass
|
|
|
|
|
them and install something from source. You should avoid mixing source
|
|
|
|
|
installs and packaged installs for (at least) the following reasons:
|
|
|
|
|
|
|
|
|
|
* You lose all the advantages above from a package managed system.
|
|
|
|
|
|
|
|
|
|
* Installing from source may overwrite, delete, or change existing files
|
2020-04-18 21:27:08 +00:00
|
|
|
|
that are in a package, making that package not function correctly.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
* The source install may override a package install causing undefined
|
2020-04-18 21:27:08 +00:00
|
|
|
|
behavior in the package or source installed item.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
* Installing from source makes it impossible or very difficult for
|
2020-04-18 21:27:08 +00:00
|
|
|
|
anyone to help you debug issues, since versions can't be easily queried
|
|
|
|
|
and integrity checked.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
* Fedora packages may include patches or configuration to work with
|
2020-04-18 21:27:08 +00:00
|
|
|
|
other packages, but upstream source does not, leading to loss of
|
|
|
|
|
functionality.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
* Software installed from source will not upgrade with package managed
|
2020-04-18 21:27:08 +00:00
|
|
|
|
packages, leading to breakage in the source install package on upgrades
|
|
|
|
|
or os updates.
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
Strongly consider making your own package if you need a different
|
|
|
|
|
version or a version of some package with changes. See:
|
2022-02-05 21:00:18 +00:00
|
|
|
|
xref:package-maintainers::Packaging_Tutorial_GNU_Hello.adoc[Packaging Tutorial: GNU Hello]
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
[[preferred-search-order-for-a-software]]
|
|
|
|
|
Preferred search order for a software
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
If some software is missing in your installation then you should try the
|
|
|
|
|
following steps to get the packaged version:
|
|
|
|
|
|
2022-05-04 18:03:02 +00:00
|
|
|
|
1. Search in Fedora ( 'dnf search foo' or search for 'foo' in the
|
2020-04-18 21:27:08 +00:00
|
|
|
|
PackageKit gui )
|
2022-05-04 17:29:37 +00:00
|
|
|
|
2. Try one of the available xref:finding-and-installing-linux-applications.adoc#_enabling_third_party_repositories[third-party repositories]
|
|
|
|
|
3. xref:package-maintainers::Packaging_Tutorial_GNU_Hello.adoc[Build your own package]
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
[[package-management-tools]]
|
|
|
|
|
Package Management tools
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
2022-05-04 18:03:02 +00:00
|
|
|
|
Here are some tools for managing packages:
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
2022-05-04 18:03:02 +00:00
|
|
|
|
* xref:dnf.adoc[dnf] - Dandified Yum
|
|
|
|
|
* https://www.freedesktop.org/software/PackageKit/[PackageKit] -
|
2017-10-26 21:20:01 +00:00
|
|
|
|
PackageKit gui tool ('add/remove software' in your menu)
|
2022-05-04 18:03:02 +00:00
|
|
|
|
* https://wiki.gnome.org/Apps/Software[GNOME Software] - Graphical package manager for GNOME
|
2023-08-19 20:33:28 +00:00
|
|
|
|
* https://apps.kde.org/discover/[KDE Discover] - Graphical package manager for KDE Plasma
|
2022-05-04 18:03:02 +00:00
|
|
|
|
* https://rpm.org[rpm] - RPM package manager.
|
2023-08-19 20:33:28 +00:00
|
|
|
|
* https://github.com/timlau/yumex-dnf[yumex] - Yum Extender
|
2017-10-26 21:20:01 +00:00
|
|
|
|
|
|
|
|
|
See a typo, something missing or out of date, or anything else which can be
|
2017-11-10 15:16:19 +00:00
|
|
|
|
improved? Edit this document at https://pagure.io/fedora-docs/quick-docs.
|