How Do I Install New Linux Software?
Before we talk about how to install a new package with RPM, let's look at the file name of a typical RPM package. If the file is named panda-2.0-1.i386.rpm, then the package name is panda, the version number is 2.0, the release number is 1, and the format is i386 (Intel compatible). The file name of a n RPM package doesn't have to be in this format, but this is the convention that is commonly used. To install the panda package, you enter the command
rpm -ivh panda-2.0-1.i386.rpm
panda ####################################
In response, RPM prints the name of the package, followed by a bunch of pound signs as the package is installed, to let you know something is happening.
Package Already Installed?
If the package is already installed, RPM will quit and print an error message like this:
panda package panda-2.0-1 is already installed
error: panda-2.0-1.i386.rpm cannot be installed
If you want to ignore the error and install the package anyway, add the --replacepkgs flag to the RPM command line, as in this example:
rpm -ivh --replacepkgs panda-2.0-1.i386.rpm
panda ####################################
Conflicting Files?
If you're installing a package that contains a file that is part of a previously installed package, RPM will quit and print an error message like this:
rpm -ivh panda-2.0-1.i386.rpm
panda /usr/bin/fluff conflicts with file from spiff-1.0-1
error: panda-2.0-1.i386.rpm cannot be installed
If you're sure that it's okay to replace the existing /usr/bin/fluff file with the copy in the panda package, you can tell RPM to ignore that error by adding the --replacefiles flag to the RPM command line, as in this example:
rpm -ivh --replacefiles panda-2.0-1.i386.rpm
panda ####################################
Unresolved Dependencies?
If you try to install a package that requires some other packages to run properly, RPM will quit and print an error message like this:
rpm -ivh hotrod-1.0-1.i386.rpm
failed dependencies:
gasoline is needed by hotrod-1.0-1
In this case, RPM is saying that the hotrod package requires that the gasoline package be installed first. If you think RPM is just trying to spoil your fun, you can add the --nodeps flag, as in the next example. RPM will skip the dependency checks and install the package anyway, but the hotrod package probably won't run correctly without gasoline.
rpm -ivh --nodeps panda-2.0-1.i386.rpm
panda ####################################
Previous Lesson: Updating Your Linux System
Next Lesson: Uninstalling Packages w/ RPM
Comments - most recent first
|
| ||
![]() |
All rights reserved - Redistribution is allowed only with permission.