OpenLDAP2.4.16 incompatible with Berkeley DB 4.7.25
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
OpenLDAP2.4.16 incompatible with Berkeley DB 4.7.25
I have installed Berkeley DB version 4.7.25 on a server and am now trying to configure OpenLDAP 2.4.16 but I get the following error:
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking for Berkeley DB major version in db.h... 4
checking for Berkeley DB minor version in db.h... 3
checking if Berkeley DB version supported by BDB/HDB backends... no
configure: error: BerkeleyDB version incompatible with BDB/HDB backends
Essentially this is what I did.
Berkeley DB Setup:
1) untar the load.
2) cd /<DB release>/build_unix
3) ../dist/configure
4) make
5) make install
OpenLDAP Setup:
1) unpackage the load
2) cd /openldap
3) ./configure
and also tried
4) ./configure --enable-debug --with-tls=openssl --enable-monitor
and also tried
5) LDFLAGS="-L/usr/local/lib -L/usr/local/BerkeleyDB/lib -L/usr/local/ssl/lib -R/usr/local/lib -R/usr/local/BerkeleyDB/lib -R/usr/local/ssl/lib" CPPFLAGS="-I/usr/local/include -I/usr/local/BerkeleyDB/include -I/usr/local/ssl/include" ./configure
Can someone please point me in the right direction. I have tried some workarounds I have seen online for similar issues but they don't work.
checking for Berkeley DB major version in db.h... 4
checking for Berkeley DB minor version in db.h... 7
checking if Berkeley DB version supported by BDB/HDB backends... yes
checking for Berkeley DB link (-ldb-4.7)... yes
checking for Berkeley DB library and header version match... no
configure: error: Berkeley DB version mismatch
Which Linux version are you doing this on, are there pre-installed berkeley DB
still around? I had no issues compiling both BDB and OpenLDAP versions you
were using here ....
Finally it will compile, but it won't work, because ldapsearch, ldapadd and other utilities will hang, without any apparent error in the logs.
I had to go back and use db-4.4 in order for openldap 2.4.16 to work.
Does slapd works?
Because as I told you I've managed also to install both of them on Slackware 12.2 (if that matters), but once I ran a ldapsearch, it hangs at the 1st "ou=..." and if I stop it, then slapd becomes irresponsible and I have to kill it.
I have tried the commands you listed, and am still seeing the following:
checking for db.h... yes
checking for Berkeley DB major version in db.h... 4
checking for Berkeley DB minor version in db.h... 3
checking if Berkeley DB version supported by BDB/HDB backends... no
configure: error: BerkeleyDB version incompatible with BDB/HDB backends
checking for db.h... yes
checking for Berkeley DB major version in db.h... 4
checking for Berkeley DB minor version in db.h... 3
It still finds your previous version before the new one. Run "make distclean" prior running ./configure to clean any cached files. As a temporary workaround you can also (re)move the symlink /usr/include/db.h
***EDIT***
In you case, it should be: export LD_LIBRARY_PATH=/usr/loca/BerkeleyDB.4.7/lib:$LD_LIBRARY_PATH
Last edited by bathory; 06-02-2009 at 09:28 AM.
Reason: typo
ldapadd -H ldaps://47.135.41.16 -x -D "cn=admin,dc=cablab,dc=com" -W -f cablab.ldif
Enter LDAP Password:
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
Your problem now is that you cannot connect to the server. Are you sure it's running and it's listening on port 636?
The problem I'm facing with db-4.7.x, is that after server starting, the 1st command I issue (ldapsearch, ldapadd, whatever) hangs and I have to kill it. After that the server becomes irresponsible and I also have to kill slapd.
This does not happen with db-4.6.x and previous versions.
Even though I haven't ever setup a secure openldap server, I think that your problem is that you cannot resolve the ip supplied in the URI, with the servername you used when you issued the ssl certificate.
Edit /etc/hosts to add an entry for the ip/hostname and try again, maybe increasing the debug level and using the -ZZ (or -Z if that fails) option:
You can read this about configuring ldap with tls/ssl.
Quote:
Found this command on another website. Does it mean anything?
[root@pcard0bu slapd.d]# /usr/local/libexec/slapd -u ldap -d 256
@(#) $OpenLDAP: slapd 2.4.16 (Jun 3 2009 14:20:51) $
root@pcard0bu:/usr/local/etc/openldap/openldap-2.4.16/servers/slapd
No passwd entry for user ldap
Quoting from slapd manpage:
Quote:
-u user
slapd will run slapd with the specified user name or id, and that
user's supplementary group access list as set with initgroups(3).
The group ID is also changed to this user's gid, unless the -g option
is used to override. Note when used with -r, slapd will use the user
database in the change root environment.
Note that on some systems, running as a non-privileged user will
prevent passwd back-ends from accessing the encrypted passwords. Note
also that any shell back-ends will run as the specified non-privileged
user
The problem I'm facing with db-4.7.x, is that after server starting, the 1st command I issue (ldapsearch, ldapadd, whatever) hangs and I have to kill it. After that the server becomes irresponsible and I also have to kill slapd.
This does not happen with db-4.6.x and previous versions.
That's because BDB 4.7 must be patched with all patches from Oracle before it is usable.
Yes, as a member of the OpenLDAP team, I'm quite aware of that. I just wanted to be sure if anyone else stumbled across this thread, they would understand that BDB 4.7 works just fine too, if the patches are applied. As noted in the README document shipped with OpenLDAP.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.