# rpm -e httpd
error: "httpd" specifies multiple packages
# rpm -e --allmatches httpd
5.2.4. Where Can I Learn More?
Maximum RPM , Chapters 2 , 3 , and 4 : http://www.rpm.org/max-rpm-snapshot/ (somewhat out of date, but useful)
The manpage for rpm
RPM is a great package manager, but to really use packages efficiently, you'll need to use RPM along with a repository system so that your Fedora system can access remote libraries of software. Having access to the repository enables the automatic resolution of dependency issues, so that when you select a software package for installation, all required associated software is also installed automatically.
Fedora uses the yum repository system. The apt system was used in earlier versions of Fedora and is still available, but most of the community's attention has shifted to yum , primarily because it supports multiple architecturesuseful when running 32-bit software (such as a 32-bit browser, for compatibility with closed-source plug-ins) on a 64-bit system.
5.3.1.1. Using yum from the command line
Using yum to install software is easy; just specify the install command and the package name you want installed as an argument:
# yum install abe
Setting up Install Process
Setting up repositories
updates-released 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
base 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 336 kB 00:01
updates-re: ################################################## 987/987
Added 24 new packages, deleted 43 old in 2.06 seconds
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for abe to pack into transaction set.
abe-1.0-5.i386.rpm 100% |=========================| 5.1 kB 00:00
---> Package abe.i386 0:1.0-5 set to be updated
--> Running transaction check
--> Processing Dependency: libSDL_mixer-1.2.so.0 for package: abe
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for SDL_mixer to pack into transaction set.
SDL_mixer-1.2.6-1.fc4.i38 100% |=========================| 6.9 kB 00:00
---> Package SDL_mixer.i386 0:1.2.6-1.fc4 set to be updated
--> Running transaction check
Dependencies Resolved
==========================================================================
Package Arch Version Repository Size
==========================================================================
Installing:
abe i386 1.0-5 extras 2.9 M
Installing for dependencies:
SDL_mixer i386 1.2.6-1.fc4 extras 84 k
Transaction Summary
==========================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 2.9 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): SDL_mixer-1.2.6-1. 100% |=========================| 84 kB 00:03
(2/2): abe-1.0-5.i386.rpm 100% |=========================| 2.9 MB 02:16
Running Transaction Test
Notice that yum automatically determined that SDL_mixer was required, confirmed the installation of both packages with the user before installing, downloaded the software in RPM format, and then installed it.
From this output, you can also see that yum started off by updating its list of available packages in each repository and later downloaded the header files for each selected package. A header file contains a package's metadata but not the installation files and scripts (and is therefore much smaller); this lets yum determine dependencies and test for file conflicts without downloading the entire package.
To install a package file that is on the local computer (e.g., received in an email from a developer or on a CD) and still take advantage of the repositories to solve dependency problems, use yum 's localinstall command:
# yum localinstall /tmp/frodo-9.6.23-4-i386.rpm
Removing software is just as simple as installing it; use yum 's remove command:
# yum remove httpd
Setting up Remove Process
Resolving Dependencies
...(Lines snipped)...
Dependencies Resolved
==========================================================================
Package Arch Version Repository Size
==========================================================================
Removing:
httpd i386 2.0.54-10.2 installed 2.5 M
Removing for dependencies:
htdig-web i386 3:3.2.0b6-5 installed 1.1 M
httpd-devel i386 2.0.54-10 installed 466 k
httpd-devel i386 2.0.54-10.2 installed 466 k
httpd-manual i386 2.0.54-10.2 installed 7.5 M
...(Lines snipped)...
squirrelmail noarch 1.4.6-0.cvs20050812.1.fc4 installed 8.1 M
system-config-httpd noarch 5:1.3.2-2 installed 1.6 M
webalizer i386 2.01_10-28 installed 244 k
wordtrans-web i386 1.1pre13-10 installed 31 k
Transaction Summary
==========================================================================
Install 0 Package(s)
Update 0 Package(s)
Remove 39 Package(s)
Total download size: 0
Is this ok [y/N]: n
Exiting on user Command
Complete!
Here, the removal of httpd would cause dependency failures for 38 other packages, so yum offered to remove all 39 packages together. In this case, the user elected not to proceed, so yum exited.
yum can also update software:
# yum update
Setting up Update Process
Setting up repositories
...(Lines snipped)...
Transaction Summary
==========================================================================
Install 5 Package(s)
Update 19 Package(s)
Remove 0 Package(s)
Total download size: 27 M
Is this ok [y/N]: y
Downloading Packages:
(1/24): bind-utils-9.3.1- 100% |=========================| 146 kB 00:00
Читать дальше