In AIX 5.3, Quick guide to RPM: To install: rpm -i To upgrade (works for install as well): rpm -U To remove/deinstall: rpm -e # As in foo, not foo.ppc.rpm To query an installed package: rpm -q To query all installed packages: rpm -qa To list files in a package: rpm -ql To list requirements for a package: rpm -q --requires To find package providing requirements: rpm -q --whatprovides (Not --redhatprovides) To query an uninstalled RPM: rpm -qp To get help: rpm --help -------------------------------------------------------------------------------------------- Some RedHat rpm incantations rpm -q --whatprovides /lib/liblaus.so.1 To see which package provides this file. In RHEL, you need the rpmdb-redhat package. (In RHEL v3, the --whatprovides was called --redhatprovides) The answer is laus-libs-0.1-65RHEL3, which is in the /afs/d/software/fixes/linux directory. rpm -qip some.package.rpm To see general info about this rpm package rpm -qlp some.package.rpm To see what this rpm package installs without installing it. Beware of misleading results. Normally you'd see fully-qualified filenames, but with the openafs-1.2.11-rhel3.0.1.src.rpm package, I saw ChangeLog openafs-1.2.11-doc.tar.bz2 openafs-1.2.11-rc.patch openafs-1.2.11-src.tar.bz2 openafs-1.2.11.spec openafs-CellServDB openafs-LICENSE.Sun openafs-README openafs-SuidCells openafs-ThisCell openafs-afsmodname openafs-cacheinfo openafs-krb5-2.0.tar.gz Yet it installed 11 of those 12 files in /usr/src/redhat/SOURCES and the other in /usr/src/redhat/SPECS. rpm -ivh some.package.rpm To install a package, but normally I use rpm -Uvh some.package.rpm which will upgrade some.package if a lower-level is already installed. rpm -Uvh --replacepkgs *rpm What I used in /local/bin/install.extra.packages to get rpm to install what was needed and not abort just 'cause some of the 165 packages were already intalled. rpm -qa To list all installed packages (similar to AIX's lslpp -L) Warning: This did not show the openafs-1.2.11-rhel3.0.1.src.rpm package. I dunno why. rpm -e package.name To erase/uninstall a package. Note this is NOT the filename of the rpm package as it is in the install command. This is the package name, which will be different. For example, to install, it's rpm -ihv zip-2.3-8.i386.rpm but to uninstall, it's rpm -e zip See /var/log/rpmpkgs and /var/lib/rpm and /usr/lib/rpmdb/i386-redhat-linux/redhat -------------------------------------------------------------------------------------------- To eliminate the following warning when installing a rpm package, warning: telnet-server-0.17-26.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e Import (not install) the RPM-GPG-KEY you'll find on any of the install CDs, or in AFS. rpm --import /afs/d/software/base/linux/Redhat.Enterprise.Linux.AS-3/RPM-GPG-KEY -------------------------------------------------------------------------------------------- We had some kind of rpm database corruption on kristine on 6-16-2004 when Sandy installed DB2. Most rpm commands gave this error message, error: db4 error(-30989) from dbcursor->c_get: DB_PAGE_NOTFOUND: Requested page not found or rpm -Va IBM_db2msen81 error: rpmdbNextIterator: skipping h# 530 blob size(2856): BAD, 8 + 16 * il(17) + dl(3460) error: db4 error(-30989) from dbcursor->c_get: DB_PAGE_NOTFOUND: Requested page not found - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A few google searches turned up these tidbits, You can repair damage in a db3 based rpm database using tools found in the db4-utils package. For example, to check for problems, cd /var/lib/rpm for i in [A-Z]* ; do echo $i -- db_verify $i done To repair the damage (assuming Packages is damaged) cd /var/lib/rpm mv Package Packages-SAVE db_dump Packages-SAVE | db_load Packages and re-verifying as above. If need be, install the db4-utils package, cd /afs/d/software/base/linux/Redhat.Enterprise.Linux-3/RedHat/RPMS rpm -Uvh db4-utils-4.1.25-8.i386.rpm If you get errors similar to db_verify: Program version 4.1.25 doesn't match environment version 4.1.24 A google search on THAT, found this bit of advice, Do rm -f /var/lib/rpm/__db* to eliminate the versioned cache files. Erasing these, certainly DID get rid of the error message, but what are these files? A good reference is http://www.rpm.org/hintskinks/repairdb, which has a lot of good info, too much to repeat here. But yes, they confirm that erasing those /var/lib/rpm/__db* files is ok. They contain rpm database lock information and will get re-created if missing. After doing the rm /var/lib/rpm/__db* command, I now get these errors when running rpm -qa >/dev/null error: rpmdbNextIterator: skipping h# 530 blob size(2856): BAD, 8 + 16 * il(17) + dl(3460) error: rpmdbNextIterator: skipping h# 529 blob size(2460): BAD, 8 + 16 * il(0) + dl(0) error: rpmdbNextIterator: skipping h# 528 region trailer: BAD, tag 2013277472 type 1970300001 offset -1952784500 count 1864381230 Time to do this other command found in that www.rpm.org web page, rpm -vv --rebuilddb and now all rpm commands run clean. Further reading suggests that rpm problems such as this, are very common. Get used to 1) rm /var/lib/rpm/__db* whenever you get this error message db_verify: Program version 4.1.25 doesn't match environment version 4.1.24 2) rebuilding the rpm database with rpm -vv --rebuilddb - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Another error I got on 2-17-2006 was a bunch of error: error(-30978) getting "zip" records from Name index rpmdb: PANIC: fatal region error detected; run recovery error: db4 error(-30978) from db->sync: DB_RUNRECOVERY: Fatal error, run database recovery on kristine after updating rpm packages with up2date, and the above commands fixed it. -------------------------------------------------------------------------------------------- During an install, the redhat-config-packages program runs. To run this after installation, you can redhat-config-packages --tree=/afs/d/software/base/linux/Redhat.Enterprise.Linux.AS-3 --------------------------------------------------------------------------------------------