Software Installation and Maintenance
◾
537
or
libgcrypt.so.11.5.3
. We will briefly discuss the idea of
linking and libraries when
we examine gcc later in this chapter.
Returning to the package manager, it can be used to update installed software by install-
ing newer versions, patches, or additional library files. The package manager can also be
used to remove software packages if they are no longer of use.
This is the antithesis of
installation in that the files placed in various directories must be identified, and those that
are not involved with dependencies of other packages are deleted.
13.4.1 RPM
For our examination in this section, we start with the more primitive tool, rpm.
To use rpm,
you must first have an rpm file. The rpm file is an archive compressed using gzip. You can
obtain rpm files from an
RPM repository
. There are many RPM repositories. For CentOS, the
primary
website is
centos.karan.org
. For non-CentOS Red Hat, you can find RPMs at
rpmfind.net/linux/RPM
. RPM Fusion (
rpmfusion.org
) advertises RPMs that the
Fedora Project and Red Hat Enterprise Linux do not want to ship. You can also find numer-
ous RPM files for a
variety of distributions at
rpm.pbone.net
. At
packages.debian.
org
, you can find Debian apt repositories that have been ported to the RPM format.
The RPM files are given very expressive names divided into four sections. The first three
sections are separated by hyphens to express the software’s name (title), version number,
and release number. You might, for instance, see
a package name like
title
-2.3.1-3. This
would be the
title
’s version 2.3.1, release number 3. Following these three are a period fol-
lowed by the intended architecture type. As the RPM contains compiled software in the
form of executable files, the RPM is intended for a particular platform.
For instance,
i386
means Intel 386 (or later),
i686
means Intel 686 (Pentium II or later),
ppc
for PowerPC
processors, and
sparc
is used for Sun Sparc workstations. The entry
noarch
for an
architecture means that the RPM should run on any architecture.
Once you have selected and downloaded the rpm file(s), you can use the rpm instruc-
tion. The basic form of the command is
rpm [option] file(s)
where the file(s) is(are) the rpm file(s). The options are
• -i (or --install)
to install the package
• -U (or --upgrade) to upgrade the package
• -F (or --freshen) to freshen the package
• -e (or --erase) to remove the package
There is little difference between upgrade and freshen. Both will update the given pack-
age with a newer version. However, with freshen, a previous version must have already been
installed whereas upgrade can either update the already-installed
package or install from
scratch. If you are unsure if a package already exists, upgrade is the better choice to either
install or freshen. In fact, since install allows you to install multiple instances of the same
538
◾
Linux with Operating System Concepts
package rather than replace preexisting versions (or skip installation), using -U/
--upgrade
is preferred in all cases.
Installation using rpm should be straightforward. However, you might find that any
given package has
Do'stlaringiz bilan baham: