Linux with Operating System Concepts



Download 5,65 Mb.
Pdf ko'rish
bet199/254
Sana22.07.2022
Hajmi5,65 Mb.
#840170
1   ...   195   196   197   198   199   200   201   202   ...   254
Bog'liq
Linux-with-Operating-System-Concepts-Fox-Richard-CRC-Press-2014

dependencies
. A package dependency means that there is some capabil-
ity that the RPM file needs in order to install and run properly. A dependency is usually a 
library
that is missing (libraries are explained in the next paragraph). It is now your respon-
sibility to figure out what package(s) contains the dependent item(s) and install it(them).
The reason that dependencies exist is that programmers will rely on other, already-
implemented software components to simplify their own programming process. Without 
this reliance, programmers would each have to implement numerous additional tasks such 
as program code that creates windows, deals with virtual memory and handles security. 
Therefore, programmers utilize library components that are collections of functions (or 
classes). The problem is that to install their software, you may not have already installed 
those dependent components.
Unfortunately, it is not necessarily as simple as downloading and installing another 
RPM file to fulfill a dependency. You might find that to fulfill a dependency, you need to 
download a package that itself has dependencies that require that you install a package, 
which itself has dependencies that require… This is a situation that some call 
dependency 
hell
because it can be a challenge to track down any missing dependencies.
You can test an RPM for dependencies by adding --
test
to your install command. For 
instance, 
rpm –i
--test
somepackage.version.rpm
will test to see if 
somepack-
age
can be installed. Below is the output of such a report. In this case, the software title is 
replaced with — — — — — — — — — -.
error: Failed dependencies:
libSDL-1.2.so.0 is needed by - - - - - - - - - -
libSDL_mixer-1.2.so.0 is needed by - - - - - - - - - -
libc.so.6 is needed by - - - - - - - - - -
libc.so.6(GLIBC_2.0) is needed by - - - - - - - - - -
libc.so.6(GLIBC_2.1) is needed by - - - - - - - - - -
libc.so.6(GLIBC_2.1.3) is needed by - - - - - - - - - -
libm.so.6 is needed by - - - - - - - - - -
libpthread.so.0 is needed by - - - - - - - - - -
libpthread.so.0(GLIBC_2.0) is needed by - - - - - - - - - -
This message informs us that this package has numerous unmet dependencies. 
Unfortunately, the listed capabilities, 
libSDL-1.2.so.0

libSDL_mixer-1.2.so.0

libc.so.6

libm.so.6
, and 
libpthread.so.0
are library names, not package 
names. We must find one or more packages that contain these libraries and install that/
those package(s). But which package(s)?
Fortunately, to simplify this task, there is an RPM resource finder website, 
rpmfind.
net
. By entering the needed library, say 
libc.so.6
, into the search box from this website, 
we are provided a page of links to obtain the necessary RPM file. See Figure 13.4, which 
provides a partial view of this page. From here, we select a link that matches our platform, 


Software Installation and Maintenance

539
as in 
ix86 Red Hat Linux 7.1 for ia64
. As the rpm file contains executables, 
we have to match the platform. Alternatively, we could download the source code from 
SourceForge and build the missing libraries ourselves.
So we download the rpm file that contains the missing library(ies). Now we install that 
or those rpm file(s). With the dependency(ies) resolved, we can return to installing our 
original RPM file. We issue the 
rpm –i 
packagename
. Figure 13.5 provides a ver-
bose output of this command (note that the specific rpm filename has again been replaced 
FIGURE 13.4 
RPM finder webpage providing links to missing libc.so.6 library.
D: read h# 
1094 Header sanity check: OK
D: Requires: libc.so.6 
YES (db provides)
D: Requires: libc.so.6(GLIBC_2.0) 
YES (db provides)
D: Requires: libc.so.6(GLIBC_2.1) 
YES (db provides)
D: Requires: libc.so.6(GLIBC_2.3) 
NO
D: package –––––––––––––––––– has unsatisfied Requires: libc.so.6(GLIBC_2.3)
D: Requires: libm.so.6 
YES (db provides)
D: Requires: libm.so.6(GLIBC_2.0) 
YES (db provides)
D: Requires: libncurses.so.5 
YES (db provides)
D: Requires: rpmlib(CompressedFileNames) 
<=
3.0.4-1 
YES (rpmlib provides)
D: Requires: rpmlib(PayloadFilesHavePrefix) 
<=
4.0-1 
YES (rpmlib provides)
D: opening db index 
/var/lib/rpm/Conflictname rdonly mode 
=
0x0
error: Failed dependencies:
libc.so.6(GLIBC_2.3) is needed by ––––––––––––––––––––––––
D: closed db index 
/var/lib/rpm/Conflictname
D: closed db index 
/var/lib/rpm/Providename
D: closed db index 
/var/lib/rpm/Basenames
D: closed db index 
/var/lib/rpm/Name
D: closed db index 
/var/lib/rpm/Packages
D: closed db environment /var/lib/rpm
FIGURE 13.5 
Output of RPM installation.


540

Linux with Operating System Concepts
with — — — — — — -). Notice that not all dependencies have been fulfilled in the output. 
Specifically, GLIBC_2.3 is needed.
Many RPM files contain a digital signature. This signature is used to ensure the authen-
ticity of the file. This allows you to feel safe in that what you are installing is a legitimate 
piece of software. Should the signature be absent or incorrect, you will receive either an 
error or warning. These messages can be cryptic if you do not know why they arise. Errors 
can arise if the signature is not recognized or does not match what is expected and warnings 
are issued if there is no signature. Error messages include the word “BAD” to indicate that 
the signature was deemed bad while the warning messages include the word “NOKEY.” The 
warning will not prevent the package from being installed/upgraded while the error will.
The rpm program has a number of installation/upgrade options. A few of the more use-
ful ones are listed in Table 13.1.
Other options are available if you are querying or verifying a package. Querying a yet-
to-be-installed package allows you to find out information about that package, including, 
for instance, the executable files, document files, configuration files, or script files enclosed 
in the package, package information (name, version, description), dependencies, and the 
state of the files in the package (e.g., installed, not installed, replaced). Verifying a package 
compares the information as stated about the files to the actual files. This includes testing 
the checksum value, comparing the listed and actual file types, permissions, owners, and 
modification times. You can also check the signature explicitly using 
rpm --checksig
.
Obviously, there is a lot to using rpm. However, as a system administrator, it can be easy 
to install software from the RPM should the dependencies check out ok. Otherwise, you 
may find yourself searching for RPM files that satisfy dependencies, and this can be annoy-
ing and time consuming.
13.4.2 YUM
Using yum to install software is far simpler than using rpm. The main reason for this is 
that yum will seek out dependencies of a package and find packages to install that resolve 
those dependencies. In this way, installing a single package may actually require installing 
numerous packages. But once you issue the yum command, you can be blissfully ignorant 
of the amount of work involved!
TABLE 13.1 
RPM Installation and Upgrade Options

Download 5,65 Mb.

Do'stlaringiz bilan baham:
1   ...   195   196   197   198   199   200   201   202   ...   254




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish