TuxPPC
TuxPPC
home   |   submit: news, guide,   |   volunteer   |     |  


Sponsored by
Sponsored by PowerMax.com

Buy iMac


News Editions

About iMac

About Linux

Getting Started

Getting Help

User Resources

Advertisement

Distributions

Software Picks






Search

 

Links
  iMacLinux Edition Saturday, 14 June 2003  



Posted by on Tuesday February 20th, 2001 12:38:23 PM
RPM or the Red Hat Package manager, is system used for installing most binary software on many systems, including Yellow Dog Linux, LinuxPPC, MkLinux and SuSE.

Installing a Package

You can install a package called (for example) mozilla-0.8-2, using this command:

rpm -Uvh mozilla-0.8-2.ppc.rpm

What Does That Command Do?

rpm      #Name of Program that Installs Packages
-U       #Upgrade Package (ie. Replace Older one with Newer One)
-v       #Verbrose, Explain Any Errors in Detail
mozilla  #Name of Package
0.8      #Version of Software
-2       #Version of Package (ie. Number of Changes in Package
.ppc.rpm #Extension for a PowerPC RPM, i386.rpm nor src.rpm won't
         #work with command.

Depends Errors

You may get errors when running this command, called depencies errors. Programs in Linux frequently depend on other programs, or other libaries.

The easiest way to deal with this, is use a tool like yup to install packages instead.

If you can't use a tool like yup, you will have to figure out what package contains the file that it is requesting (such as libXm.so is in the OpenMotif package).

rpmsearch is another tool that you might find helpful to figure out what depends it requires.

Removing a Package

You can remove a package using this command:

rpm -e mozilla-0.8-2

This is a bit different from installing, you do NOT and should not, include the .ppc.rpm part (once it's installed, it's no longer an RPM, it's an expanded bundle of files managed by RPM.

What Does That Command Do?


rpm      #Name of Program that Installs Packages
-e       #Upgrade Package (ie. Replace Older one with Newer One)
mozilla  #Name of Package
0.8-2    #Version of Software/Package (Optional, used in rare cases
         #where you have multiple versions of the same package installed).

Again, you will have depends errors, if you try to remove a library (for example GTK+), or a program that provides services to other programs (for example mailx).

Checking to See if A Package is Installed

You can check if a package is installed using:

rpm -qa | grep mozilla

What Does That Command Do?


rpm      #Name of Program that Installs Packages
-q       #Query (List) Packages
-a       #List All Packages
|        #Pipe Data to Another Program
grep     #Finds Lines Containing A Certain Text String
mozilla  #Name of Package

Forcing Packages

Sometimes you will want to override what RPM is trying to keep you from doing. This is normally a bad idea, because most of the time, RPM knows best. In case you ever have to do this, you can force and install or remove of packages using these flags:


-nodeps #Ignore Depends Warnings, And Install/Remove Package Anyway.
        #This could lead to a broken, unstable system.
-force  #Allow Package to do Naughty Stuff like Overwriting Files
        #from other packages.

Good luck. If you have suggestions, comments, or anything else, send them to Andrew B. Arthur,aarthur@imaclinux.net.

Search for rpm

The Fine Print: The following comments are owned by whoever posted them.
(Reply)

by on Wednesday July 25th, 2001 04:43:14 AM

I find the most valuable commands besides installing and uninstalling are "rpm -qpi" which given a description of the rpm and "rpm -qpl" which lists the files that it installs.

When I get a new version of my distribution (SuSE) I have a wee script which gets these details (and some others like what libraries it installs - great for those annoying dependancies) from all the rpms on the disk and puts them in a big file, grepping is then a lot easier than searching by hand.


  Legal and Privacy Notices Copyright © 2001