From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 Description of problem: When attempting to install, query, or otherwise interact with the RPM database using RPM, we get the following errors: #rpm -Uvh ... rpmdb: /var/lib/rpm/Packages: unexpected file type or formaterror: cannot open Packages index using db3 - Invalid argument (22)error: cannot open Packages database in /var/lib/rpm #rpm --rebuilddb rpmdb: /var/lib/rpm/Packages: unexpected file type or formaterror: cannot open Packages index The permissions of /var/lib/rpm are identical to a working system. Removing the /var/lib/rpm/__db* lock files has no effect (as is probably expected). The 'file' utility reports that the Packages file is "data". Version-Release number of selected component (if applicable): rpm-4.2-0.69 How reproducible: Didn't try Steps to Reproduce: We're not sure how the database got into this state, so we're not sure how to reproduce. Additional info:
EINVAL during open is usually the new fangled O_DIRECT kernel interpretation that breaks rpm. You need to boot an older, 2.4.x kernel, upgrade to rpm-4.2-1 from ftp.rpm.org, then reboot the kernel that you are running. Reopen this bug if that does not fix.