Archive for the ‘Uncategorized’ Category.

Find architechture of installed RPM package

When trying to find a rpm package on a 64 bit installation of Red Hat, you will sometime encounter two packages with the same name:

# rpm -qa zlib
zlib-1.2.1.2-1.2
zlib-1.2.1.2-1.2

This happens when a 32 as well as a 64 bit package exists on the server. If you want to find out which is which, you will have to use a somewhat trickier rpm command:

rpm -qa --qf "%{n}-%{v}-%{r}.%{arch}\n" zlib
zlib-1.2.1.2-1.2.i386
zlib-1.2.1.2-1.2.x86_64

Voila