Skip to content

Tag Archives: rpm

Extracting an RPM without installing it

01-Apr-09

If you want to inspect files in an RPM without installing it, use rpm2cpio piped to cpio:
rpm2cpio file.rpm | cpio -id
Note that this will create a (local) directory tree under which the extracted files will be placed. In other words, expect the files to be extracted under a newly created “usr” directory or similar.

Fixing RPM Database Errors After an Upgrade of the RPM Package

28-Dec-08

For errors similar to these:
rpmdb: Program version 4.2 doesn’t match environment version
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index using db3 – Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm
Do this:
# rm -f /var/lib/rpm/__*