There are several tools available to install RPMs, the main one being the command line interface yum (which stands for Yellowdog Updater Modified). To install an extra RPM which is in one of the known repositories, use cl-asuser to run the yum command.
Run the command cl-asuser yum install packagename
where packagename is the name of a package. (On a 64 bit
machine it may install the 32-bit and 64-bit versions of packagename
if both are available. To avoid this, use cl-asuser yum install
packagename.x86_64 instead.)
How do I know the name of the package ? If using yum, then
you can usually just guess - for example, the xfig utility is
provided by the xfig package. There are some less obvious
common examples (see Non-obvious
package names. Or there are some useful yum commands (all of which
will take regular expressions as arguments):
yum list packagename: list RPMs which match packagenameyum provides filename: list RPMs which provide filename (or feature)yum search string: list RPMs which mention string in their info
For example, to install the utility xv run the command "cl-asuser yum install xv", which results in:
Loading "fastestmirror" plugin Loading "installonlyn" plugin Setting up Install Process Setting up repositories CL-redhat 100% |=========================| 951 B 00:00 livna 100% |=========================| 1.1 kB 00:00 http://mirror.atrpms.net/fedoracore/6/i386/os/repodata/repomd.xml: [Errno 12] Timeout: urlopen error timed out Trying other mirror. core 100% |=========================| 1.1 kB 00:00 CL 100% |=========================| 951 B 00:00 updates 100% |=========================| 1.2 kB 00:00 freshrpms 100% |=========================| 1.1 kB 00:00 CL-fedora 100% |=========================| 951 B 00:00 extras 100% |=========================| 1.1 kB 00:00 Loading mirror speeds from cached hostfile Reading repository metadata in from local files http://ayo.uk3.freshrpms.net/fedora/linux/6/i386/freshrpms/repodata/primary.xml.gz: [Errno 14] HTTP Error 502: Date: Tue, 03 Apr 2007 14:23:41 GMT Content-Length: 610 Content-Type: text/html; charset=iso-8859-1 Trying other mirror. primary.xml.gz 100% |=========================| 66 kB 00:00 http://ayo.ie.freshrpms.net/fedora/linux/6/i386/freshrpms/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum Trying other mirror. primary.xml.gz 100% |=========================| 64 kB 00:00 freshrpms : ################################################## 176/176 Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for xv to pack into transaction set. xv-3.10a-27.i386.rpm 100% |=========================| 39 kB 00:00 ---> Package xv.i586 0:3.10a-27 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: xv i586 3.10a-27 CL-redhat 1.6 M Transaction Summary ============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 1.6 M Is this ok [y/N]: y Downloading Packages: (1/1): xv-3.10a-27.i386.r 100% |=========================| 1.6 MB 00:00 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: xv ######################### [1/1] Installed: xv.i586 0:3.10a-27 Complete!
There are several things to observe in this example. The first is that there are several timeouts and other problems along the way — this is not unusual and does not indicate that the installation failed. The second is that you are asked for confirmation after the RPM is located, but before it is installed (the Is this ok [y/N]: line). If you want it to just do it without asking, use the -y option to force a "yes" answer to all questions (i.e. "cl-asuser yum -y install xv").
It is highly recommended that any such additions are added to /etc/user-config/bundles (see below) with a suitable comment, so that your set of packages will be automaticly reloaded if a system re-install is needed.
You can also use yum remove to remove a package, e.g.
"cl-asuser yum remove xv" would uninstall xv. Note that it ALSO
removes anything which depends on that package, but NOT
everything on which it depends. So you have to be careful when
removing things as deleting "one" package can cascade and remove
hundreds! yum install foo; yum remove foo does not leave
the system in the same state it was before, as things on which foo
depends will have been loaded on install, but NOT deleted
on remove.
The mplayer problem:
It was stated before that it was sometimes necessary to specify that all of the packages a package requires come from the same repository. This can be done with the yum --disablerepo option. To remove the broke packages that prevent the mplayer utility from working and to install a working set, try:
cl-asuser yum -y remove faad2 cl-asuser yum -y remove libdvdnav cl-asuser yum --disablerepo=freshrpms -y install faad2 cl-asuser yum --disablerepo=freshrpms -y install libdvdnav cl-asuser yum --disablerepo=freshrpms -y install mplayer
Software installation using apt-get
The main operations install and remove are the same as for yum. However, note that whereas "yum update" updates the RPM packages, "apt-get update" updates the meta data, and "apt-get upgrade" is used to actually upgrade the packages.