1

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 ?

  • You can try to rebuild a BDB source rpm into a BDB binary rpm. This will probably succeed, since BDB doesn't have much by way of dependencies. However, you should be careful that the applications you are using with the current version of BDB don't break when you upgrade BDB. – Faheem Mitha Jan 28 '15 at 16:13
  • I have no idea how to do this, could you guide me please ? – gr68 Jan 28 '15 at 16:14
  • It's a long time since I have used an RPM based distribution, but your first step should be to find a source rpm which corresponds to the version you want. Then install it. Then you may need to adjust the spec file. – Faheem Mitha Jan 28 '15 at 16:18
  • truly I do not understand what to do, however thank you for help. – gr68 Jan 28 '15 at 16:20
  • 1
    It looks like you are on CentOS 5 and trying to mix in RPM's from CentOS 6. That is typically bad as it will create conflicts. Secondly, pam-0.99 is set to not allow the version of bdb that you want. That is the problem you should try to take care of. – Claris Jan 29 '15 at 0:04
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.