TransWikia.com

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 ftp://195.220.108.108/linux/centos/6.6/os/x86_64/Packages/db4-4.7.25-18.el6_4.i686.rpm

but I receive this error:

Retrieving ftp://195.220.108.108/linux/centos/6.6/os/x86_64/Packages/db4-4.7.25-18.el6_4.i686.rpm
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-0.99.6.2-12.el5.i386
        db4 >= 4.4.0 conflicts with pam-0.99.6.2-12.el5.x86_64
        libdb-4.3.so is needed by (installed) subversion-1.6.11-12.el5_10.i386
        libdb-4.3.so is needed by (installed) pam_ccreds-3-5.i386
        libdb-4.3.so is needed by (installed) apr-util-1.2.7-11.el5_5.2.i386
        libdb-4.3.so is needed by (installed) db4-devel-4.3.29-10.el5_5.2.i386
        libdb_cxx-4.3.so 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!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP