Description of problem: After upgrading to rpm-4.2-0.38, all rpm operations performed as root failed. Version-Release number of selected component (if applicable): rpm-4.2-0.38 How reproducible: Everytime. Steps to Reproduce: As root, do "rpm -q rpm". Actual results: [root@suckfish root]# rpm -q rpm rpmdb: Berkeley DB library configured to support only DB_PRIVATE environments error: db4 error(22) from dbenv->open: Invalid argument error: cannot open Packages index using db3 - Invalid argument (22) error: cannot open Packages database in /var/lib/rpm package rpm is not installed Expected results: rpm package & version should be displayed (rpm is installed!). Additional Info: Doing "rpm -q rpm" as non-root worked OK. "rpm --rebuilddb" gave similar "cannot open Packages" error.
PS. Downgrading (unpacking rpm by hand!) to rpm-4.2-0.25.1 seems to fix the problem.
Yup. rpm is transiting to using nptl, and so behavior is gonna depend on which kernel is booted, which glibc is installed, and whether you are running as root or non-root. Hmmm, the behavior should have fallen back automagically. What glibc and kernel were you running?
I'm running kernel rpm 2.4.20-2.2 for i686 and glibc-2.3.1-21. [root@suckfish root]# rpm -q kernel kernel-2.4.20-2.2 [root@suckfish root]# uname -a Linux suckfish 2.4.20-2.2 #1 Fri Dec 20 13:02:59 EST 2002 i686 i686 i386 GNU/Linux [root@suckfish root]# rpm -q glibc glibc-2.3.1-21 [root@suckfish root]#
Hmmm, this is working for me with kernel-smp-2.4.20-2.2 (i686, it may matter) glibc-2.3.1-21 rpm-4.2-0.40 (don't remember a difference from -0.38) So what happens if you do (as root) rm -f /var/lib/rpm/__db* rpm -qa
I had the same problem with the same kernel and glibc for rpm-4.2-0.36 and -0.38. Do we need to install a package which is not listed in requirements?
Still the same problem: [root@suckfish rpms]# rm -f /var/lib/rpm/__db.00* [root@suckfish rpms]# rpm -qa rpmdb: Berkeley DB library configured to support only DB_PRIVATE environments error: db4 error(22) from dbenv->open: Invalid argument error: cannot open Packages index using db3 - Invalid argument (22) error: cannot open Packages database in /var/lib/rpm no packages
Hmmm, something is fishy here, but rpm's use of nptl is very, very new. Try adding the following line to /etc/rpm/macros: %__dbi_cdb create client private cdb mpool mp_mmapsize=16Mb mp_size=1Mb] This is the default config from /usr/lib/rpm/macros with the keyword "private" added.
Apologies, there's a typo from cut 'n paste %__dbi_cdb create private cdb mpool mp_mmapsize=16Mb mp_size=1Mb
That's cured it! Thanks. [root@suckfish root]# cat /etc/rpm/macros %__dbi_cdb create private cdb mpool mp_mmapsize=16Mb mp_size=1Mb [root@suckfish root]# rpm -q rpm rpm-4.2-0.38
Good, at least something "works" :-( You probably want to pay close attention to kernel/glibc/rpm updates from Raw Hide, as all this is changing quite fast, transiting to NPTL and /dev/futex.
Worked here too after the fix suggested by Jeff above. I'm running latest glibc and rpm from rawhide but also 2.5 series kernels..
I had same problem - exact same symptomps. It began when installing RawHide just before Xmas, including new rpm and glibc packages. I thought that installing a full Phoebe might cure it. Phoebe install went flawlessly, but rpm still did not work for root. Note that I had no "/etc/rpm/macros" file, just macros.prelink, macros.solve and macros.specspo FWIW, there were no "/var/lib/rpm/__db.001" file. Anyway, creating a "/etc/rpm/macros" file with the single line show in the comments cured everything. In terms of the "WORKSFORME" status, at least here is a message that it required the fix to work for me.
glibc-2.3.1-46 rpm-4.2-0.68 db4-4.0.14-20 kernel 2.5.62 the one line addition in macros made my rpm works. before the one liner: after deleting __db* #rpm --rebuilddb rpmdb: write: 0xbfffd510, 8192: Invalid argument error: db4 error(22) from dbenv->open: Invalid argument error: cannot open Packages index #rpm --rebuilddb rpmdb: unable to join the environment error: db4 error(11) from dbenv->open: Resource temporarily unavailable error: cannot open Packages index after the line addition, rpm works again. #rpm -Uvh kudzu* pciut* warning: kudzu-0.99.96-1.i386.rpm: V3 DSA signature: NOKEY, key ID 897da07a Preparing... ########################################### [100%] 1:pciutils-devel ########################################### [ 25%] 2:kudzu ########################################### [ 50%] 3:kudzu-devel ########################################### [ 75%] 4:pciutils ########################################### [100%] thanks.