I'm using RHEL 5 (64-bit) and have come across an inconsistency with rpm/yum. When I attempt to install a 32-bit RPM, I'm told the RPM is already installed when only the 64-bit version exists on the disk:
$ rpm -Uvh ./libsysfs-2.1.0-1.el5.i386.rpm
Preparing... ########################### [100%]
package libsysfs-2.1.0-1.el5.i386 is already installed
$ rpm -q libsysfs --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n
libsysfs-2.1.0-1.el5.x86_64
I have tried rebuilding the database, but I get the same error.
I have verified the RPM is not actually installed. When I run rpm -qp ./libsysfs-2.1.0-1.el5.i386.rpm
I can confirm the files listed do not exist on the system.
What am I missing? It there something else RPM looks at to see if an RPM is already installed?
Edit 1
Not sure if this is something to do with the RPM itself or not. After running updatedb
, erasing the RPM with rpm -e libsysfs
, and attempting to install both simultaneously, I get an error that package was already added:
$ rpm -e libsysfs
$ rpm -Uvh ./libsysfs-2.1.0-1.el5.i386.rpm ./libsysfs-2.1.0-1.el5.x86_64.rpm
warning: package libsysfs = 2.1.0-1.el5 was already added, skipping libsysfs < 2.1.0-1.el5
Preparing... ########################### [100%]
1:libsysfs ########################### [100%]
There are 19 other RPMs that are doing the same thing.
Edit 2
The 32-bit package still won't install.
In trying to figure out what is happening, I was able to forcibly install the rpm rpm -Uvh --force libsysfs-2.1.0-1.el5.i386.rpm
and it successfully installed.
I can verify that the files listed inside the 32-bit and 64-bit RPM now both exist on the filesystem.
However, rpm
and yum
now both think only the 32-bit version is on the disk:
$ rpm -q libsysfs --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n
libsysfs-2.1.0-1.el5.i386
I can successfully erase the 32-bit RPM, but the rpm
command now no longer recognizes the 64-bit variant, even though all the files are in place:
$ rpm -e libsysfs.i386
$ rpm -q libsysfs --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n
package libsysfs is not installed
$ rpm -qpl ./libsysfs-2.1.0-1.el5.x86_64.rpm
/usr/lib64/libsysfs.so.2
/usr/lib64/libsysfs.so.2.0.1
...
/usr/share/doc/libsysfs-2.1.0/libsysfs.txt
$ ls /usr/lib64/libsysfs.so.2
/usr/lib64/libsysfs.so.2
Rebuilding the RPM database, the libsysfs RPM is still not found.
$ cd /var/lib/rpm
$ rm -f __db*
$ /usr/lib/rpm/rpmdb_verify Packages
$ mv Packages Packages.orig
$ /usr/lib/rpm/rpmdb_dump Packages.orig | /usr/lib/rpm/rpmdb_load Packages
$ /usr/lib/rpm/rpmdb_verify Packages
$ rpm -v --rebuilddb
I'm coming to the conclusion that there must be some sort of RPM database corruption, but have no idea where to go from here.
Edit 3
To try to get a better grasp on what is happening, I erased libsysfs and tried the yum localinstall
option, but it still seems like the installer sees the 32-bit and 64-bit options as the same thing:
$ yum localinstall ./libsysfs-2.1.0-1.el5.x86_64.rpm ./libsysfs-2.1.0-1.el5.i386.rpm
...
Resolving Dependencies
--> Running transaction check
---> Package libsysfs.i386 0:2.1.0-1.el5 set to be updated
---> Package libsysfs.x86_64 0:2.1.0-1.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================
Packages Arch Version Repository Size
===============================================================================
Installing:
libsysfs i386 2.1.0-1.el5 /libsysfs-2.1.0-1.el5.i386 140 k
libsysfs x86_64 2.1.0-1.el5 /libsysfs-2.1.0-1.el5.x86_64 141 k
Transaction Summary
===============================================================================
Install 2 Package(s)
Upgrade 0 Package(s)
Total Size: 281 k
...
Running Transaction:
Installing : libsysfs 1/1
Installed products updated.
Installed:
libsysfs.i386 0:2.1.0-1.el5 libsysfs.x86_64 0:2.1.0-1.el5
Complete!
I notice that everywhere but where it actually does the installation, both architectures are mentioned, but the install still only does one.
updatedb
on your system, it will update a database for mlocate. then try to remove the installed package viarpm -e package-name
. If it works then install the (64-bit) package.updatedb
, then erased the package, but was still only able to install the 64-bit variant. The 32-bit RPM still says it's installed falsely.yum localinstall packagename