Berkeley DB mismatch error while configuring LDAP
Now the configuration is working fine. I had to export the library path for Berkeley DB properly:
export LD_LIBRARY_PATH="/root/db-6.0.20/build_unix/.libs"
Edit :
The directory build_unix/.libs
contains the necessary libs for OpenLDAP but also lots of other files produced during the Berkeley installation. I rather suggest to use the destination Berkeley lib directory which is created during the installation (it should be equal to PREFIX/lib), because you would remove/update your Berkeley source directory one day, breaking OpenLDAP runtime (see the end of my edit)
You can either export the LD_LIBRARY_PATH variable, or set it only at the configure time of OpenLDAP, this way :
LD_LIBRARY_PATH="/root/db-6.0.20.installed/lib" ./configure
Usually there would be other configuration options, I am omitting them here.
Once installed correctly, OpenLDAP may still fail to start with the following error message in the log :
5d34473d bdb_back_initialize: BDB library version mismatch: expected Berkeley DB 5.3.28: (September 9, 2013), got Berkeley DB 5.3.21: (May 11, 2012)
To solve this issue, the solution is again to force the LD_LIBRARY_PATH variable, this time in the startup script (wherever is yours, /etc/init.d/openldap for example). As we are talking about the runtime, it's important here to note we shouldn't call the build_unix/.libs
directory which is considered temporary, but the created /lib
directory.
OpenLdap exptects different version of Bekerley DB
You might have to set the LD_LIBRARY_PATH to point to the /build_unix/.libs folder as well.
A similar issue I ran into while running "./configure" for openldap was resolved by setting the LD_LIBRARY_PATH properly.
Reference:
Berkeley DB mismatch error while configuring LDAP
Building OpenLDAP from sources and missing BerkelyDB
do yum install db4-devel
(or just install the prepackaged openldap, yum install openldap-servers openldap-clients
LDAP connection ldap_sasl_bind_s gives assertion
I got this issue on Red Hat 6 when linking with both OpenLDAP libldap.so
and Oracle's client library libclntsh.so
, which embedded inside it has an Oracle implementation of the C LDAP API.
The issue is that OpenLDAP libldap.so
requires library liblber.so
, and if you don't explicitly link to it, these symbols are resolved by libclntsh.so
, and hence are incompatible.
The fix is to add -llber
to your linker line.
Note: on Red Hat 7, the error is different, you get -3 (LDAP_ENCODING_ERROR) 'Encoding error'.
Related Topics
What Is The Fastest Way to Display an Image in Qt on X11 Without Opengl
Convert Column to Matrix Format Using Awk
Ubuntu Based Docker-Machine Image
Writing a Syscall to Count Context Switches of a Process
Are System Calls on Windows Inherently Slower Than Linux
Watermarking Video from The Linux Command Line
Trouble with Vagrant - "404 - Not Found"
How to Check Character Encoding of a File in Linux
How to Let Users Run a Script with Root Permissions
Fork() and Stdout/Stderr to The Console from Child Processes
Calculate Total Disk I/O by a Single Process
Does File ".Bash_History" Always Record Every Command I Ever Issue