Installing an RPM

To install an RPM, you can use the YaST package selection tool we talked about in Chapter 1 or install manually. YaST will happily install RPMs that belong to the SUSE version it is running on, or which are available from an installation source that YaST has previously been informed about. But you cannot use YaST to install a single isolated third-party RPM package.

Installing an RPM manually involves using the command-line features of rpm as opposed to using the YaST package manager. We will talk about installing, querying, and removing RPM packages manually so that you are proficient in managing and checking installed software.

The rpm command is used to control all package operations on the system. To install a package, you need to use the -i (install) parameter. Doing a straight install is fine in most situations, but if the package is installed already (albeit a lower version), you will either need to remove the package and then install the higher version or use the -U (upgrade) parameter.

r : r j Doing an upgrade on a package that does not have a lower version install will do a i".-.,". .■¿•CV-.w-j straight install, so we usually just use the upgrade parameter.

To illustrate the dependency problem mentioned earlier, Listing 12-1 shows an install of the bbtools package. This package is a group of applications that act as helpers to the Blackbox window manager. The bbtools and bbtools-gui packages are used to configure the look and feel of the Blackbox window manager.

LISTING 12-1

Installing the bb-tools RPM Package bible:/media/SU1030.001/suse/i586 # rpm -Uvh bbtools-2007.4.24-47.i586.rpm error: Failed dependencies:

blackbox is needed by bbtools-2007.4.24-47.i586.rpm

We used the -U (upgrade), -v (verbose output), and -h (show hashes) parameters. The -v and -h parameters are usually very helpful in giving you active feedback for the installation of a package.

The bbtools package depends on quite a few other software packages; thankfully, most have already been installed during the installation of SUSE. However, you can see that we do not have the Blackbox window manager installed, as RPM's dependency tree can tell this from the RPM itself.

To be successful, you need to install both Blackbox and bbtools. The RPM system is able to install multiple RPM files and will take into account whether the packages to be installed depend on one another. This proves very useful in these situations. Listing 12-2 shows an installation of both bbtools and the Blackbox RPM.

LISTING 12-2

Installing Both bb-tools and Blackbox bible:/media/SU1030.001/suse/i586 # rpm -Uvh bbtools-2005.1.24-3.i586.rpm blackbox-0.65.0-313.i586.rpm

Preparing ... ########################################### [100%]

1:blackbox ########################################### [ 50%]

2:bbtools ########################################### [100%]

# rpm -Uvh bbtools-2007.4.24-47.i586.rpm blackbox-0.70.1-96.i586.rpm Preparing ... ########################################### [100%]

1:blackbox ########################################### [ 50%]

2:bbtools ########################################### [100%]

Take note that even though we specified bbtools before Blackbox, RPM was able to see that Blackbox had to be installed first during the preparation phase of package installation.

Was this article helpful?

0 0

Post a comment