I have an unrelated issue to this RPM issue. I'm not sure if the two relates but I'll just talk about the one that's related to running the
rpm command since it's easier to explain. The other issue we're having relates to our application, which no one else would know about. ANyways, so one our QA person is trying to troubleshoot why files can't be written to this particular directory. For some reason she decided to run
rpm -qa | grep -i lp. Let's say the directory is
/home/tom/mydir. If she runs the rpm command outside of
/home/tom/mydir as her user, she gets the desired result. If shes inside that directory, she encounters the following.
error: cannot open Packages index using db3 - Invalid argument (22) error: cannot open Packages database in /var/lib/rpm
As root I can run the rpm command just fine within said directory or anywhere else. She thinks the issue is related, I'm just tyring to understand why this directory is giving us issue as her user.
Yes, I've tried rebuilding the RPM database as well.