Tyler Chris - Fedora Linux стр 57.

Шрифт
Фон

To remove the packages, you'll either need to specify the full package name including the software and package version numbers (e.g., httpd-2.0.54-10 instead of httpd ) to delete one specific version, or use the --allmatches option to remove all versions:

# rpm -e httpd

error: "httpd" specifies multiple packages

# rpm -e --allmatcheshttpd

5.2.4. Where Can I Learn More?

Maximum RPM

The manpage for rpm

5.3. Using Repositories

5.3.1. How Do I Do That?

yum apt yum

5.3.1.1. Using yum from the command line

yum install

# yum installabe

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 removehttpd

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)

Ваша оценка очень важна

0
Шрифт
Фон

Помогите Вашим друзьям узнать о библиотеке