Managing RPMs on an x86_64 Machine

A couple of weeks ago I did a complete rebuild of my main workstation at home, converting it from 32-bit CentOS 5.1 to x86_64. I had briefly done this before, last May, with mixed success. At that time the thing caused me to back down was the lack of support for Firewire, which I needed to import data from my Sony video camera.

Since that time the CentOS project has made the necessary drivers and kernel modules available in its centosplus kernel packages for both x86 and x86_64, clearing the way for me to reintroduce a 64-bit desktop to the lab here on the 3rd floor.

One of the things that makes running either 32-bit or 64-bit software under the same O/S possible is the simultaneous existence on the same box of the necessary libraries, and often binaries, for both architectures. I ran into the primary drawback of this approach this when cleaning up after the default install of totem that comes with the Multimedia package group.

Basically, doing just an “rpm -e totem” wasn’t specific enough for the system, which barked back:

error: "totem-2.16.7-1.el5" specifies multiple packages

The way around this problem is to use the “–allmatches” switch when running rpm. So in my case:

rpm -e --allmatches totem

(the default install of 32-bin rhythmbox requires totem, so it had to be removed first)

Checking on the architecture of a particular package can be done with the following command:

rpm -q --qf "%{ARCH}"

There is another was to do this, of course: by simply specifying the architecture of the package with a dot extension. So:

rpm -qi libpng.i386

will retrieve information on the 32-bit version of libpng installed, while:

rpm -qi libpng.x86_64

gives you the same thing, only on the 64-bit version.

Because yum also understands this notation, you can actually avoid installing a particular architecture when desired. For example:

yum install firefox.i386

will cause only the 32-bit version of the firefox package to install. By default yum would normally load both 32 and 64-bit versions, resulting in your launching the 64-bit version (the executable /usr/bin/firefox is the 64-bit version).