On Oct 27, 2006, at 12:03 PM, Kevin Cosgrove wrote:
Over the years, or so I find with lots of web searching, a number of
people have reported troubles like the following:
rpmdb: Program version 4.4 doesn't match environment version
67108864.67108864
error: db4 error(-30971) from dbenv->open: DB_VERSION_MISMATCH:
Database environment version mismatch
error: cannot open Packages index using db3 - (-30971)
error: cannot open Packages database in /login/kevinc/lib/rpm-linux
package rpm is not installed
The usual solution is to remove the __db.00[0-9] files and --rebuilddb
FWIW, the --rebuilddb is unnecessary, and might even hurt if run with
a damaged cache (i.e. what is in the __db* files).
That *would* work for me were it not for the fact that I'm running two
architectures of rpm (of the same version, 4.4.6) one on Solaris 5.8,
and the other on Red Hat Enterprise 3.0. Both architectures share one
common rpm database. I'm just a user on these systems, so everything
of RPM lives somewhere in my $HOME. I just think RPM is great at
managing my packages, so I build it first when I move (or get moved)
to a new Unix-like system.
Sharing an rpmdb how? Hint: NFS won't work without fcntl locking and
a lot
of careful sysadmin, use sunrpc instead. Read the Sleepycat doco for
details.
OK, so Solaris rpm-4.4.6 is using internal db-4.4.20, and RHEL3 is using
db-4.2.52 (I've forgotten, might be 4.3.29 or 4.1.25).
One of those versions of rpm has to change so that both use the same
version
of Berkeley DB. Alternatively, you can figure out how to use dbdump/
dbload
to do the conversion, but I suspect the conversion will be very
annoying.
I've built/installed the following for both systems so that rpm might
build the same way on both systems
beecrypt-3.1.0
db1-1.85
db4-4.1.25
libxml2-2.6.21
ncurses-5.4
neon-0.24.7
readline-5.0
zlib-1.1.3
It seems that rpm must be linking against the wrong version of db
somewhere. From /usr/include/db.h on the Solaris machine it appears
that db 2.7.5 is installed in the system tree. From /usr/include/db.h
on the Red Hat machine it appears that 4.1.25 is installed in that
system tree.
As distributed, rpm uses an internal version of Berkeley DB, not
"system"
installed Berkeley db, because that is/was the recommended Sleepycat
solution.
I've got the built build trees intact on both systems, so I should be
able to answer questions, if I haven't provided enough info.
I'm really stuck. Would anyone have any advice, a lead, or something
I can try to track down?
So find the source tree for which ever version of rpm (call it X.Y.Z)
you want to change.
That choice implies a version (call it P.Q.R) of Berkeley DB that you
need to recompile with.
In rpm's source tree, remove the internal version of Berkeley DB
cd rpm-X.Y.Z
rm -rf db
Replace with the version of Berkeley DB from Sleepycat:
cd rpm-X.Y.Z
tar xzvf db-P.Q.R.tar.gz
mv db-P.Q.R db
Recompile rpm.
At worst you'll have to edit rpmdb/Makefile to change the hard-wired
P.Q there.
You might get some failed compiles from rpmdb/dbconfig.c or rpmdb/db3.c.
Diff against the other version of rpm to see the "fix".
hth Send mail privately with details if you get stuck.
There's another approach to detect the version mismatch and automate
removal of the __db* files. rpm-4.4.6 has most of that fix, but hell
will freeze over before
RHEL3 rpm is changed is my guess, so that solution is a non-starter.
73 de Jeff
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list