Upgrading Berkeley DB rpm in a Centos OS

Unix & Linux Asked by gr68 on December 16, 2020

I have a software which needs Berkeley DB 4.5 or above.

But in my CentOS 5.11 x86_64 Server I have:

  • Package db4-4.3.29-10.el5_5.2.x86_64 already installed and latest version
  • Package db4-4.3.29-10.el5_5.2.i386 already installed and latest version

How can I upgrade these rpm to a newer version?
I tried to upgrade using Centos 6.6 rpm in this way:

rpm -Uvh

but I receive this error:

warning: /var/tmp/rpm-xfer.IKWqHE: Header V3 RSA/SHA1 signature: NOKEY, key ID c105b9de
error: Failed dependencies:
        rpmlib(FileDigests) <= 4.6.0-1 is needed by db4-4.7.25-18.el6_4.i686
        rpmlib(PayloadIsXz) <= 5.2-1 is needed by db4-4.7.25-18.el6_4.i686
        db4 >= 4.4.0 conflicts with pam-
        db4 >= 4.4.0 conflicts with pam- is needed by (installed) subversion-1.6.11-12.el5_10.i386 is needed by (installed) pam_ccreds-3-5.i386 is needed by (installed) apr-util-1.2.7-11.el5_5.2.i386 is needed by (installed) db4-devel-4.3.29-10.el5_5.2.i386 is needed by (installed) db4-devel-4.3.29-10.el5_5.2.i386

I also tried to compile from source db-4.5.20.tar.gz. I compiled it with no problem, however my software is still seeing the Berkley DB preinstalled in rpm package db4-4.3.29.

Any help please ?

One Answer

The somewhat non-obvious answer here is to install Yet Another Version of Berekeley DB in parallel to existing. Then build against the newly installed headers/libraries using -I/usr/include/db-X.Y and -ldb-X.Y flags while building.

The easiest way to avoid the "system" headers (i.e. #include "db.h") and libraries (i.e. -ldb) while building is to (temporarily) uninstall the db4-devel package to ensure that your build uses the -I/usr/include/db-X.Y and -ldb-X.Y flags during the build. Reinstall db4-devel afterwards.

Answered by Jeff Johnson on December 16, 2020

Add your own answers!

Related Questions

i need to generate ansible-playbook using jinja2 with csv file in ansible

1  Asked on December 6, 2021 by vithushan-rasalingam


curl jq get value from field name

2  Asked on December 6, 2021


Some RUN-Commands in UDEV-Rule are ignored

1  Asked on December 6, 2021 by niels


NFS Share on Centos 7 Fails to automount

2  Asked on December 4, 2021 by steelmonkey


behavior of ServerAliveInterval with ssh connection

2  Asked on December 4, 2021 by kumarprd


scp using ssh tunneling

4  Asked on December 4, 2021 by mano-mini


How to get nth result from find?

2  Asked on December 4, 2021 by ddlfmbqrc


Use & (ampersand) in single line bash loop

4  Asked on December 3, 2021 by ljs-dev


syslog-ng fail to start

1  Asked on December 3, 2021 by satch_boogie


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir