I'm trying to compile openldap on ubuntu, but my /configure get stuck on this:

checking for db.h... yes
checking for Berkeley DB major version in db.h... none
configure: error: Unknown Berkeley DB major version in db.h

here is my configure command:

./configure --prefix=/usr/local/openldap --enable-overlays=mod --enable-modules --enable-bdb --enable-accesslog --enable-auditlog --enable-collect --enable-memberof --enable-syncprov

I have bdb installed in


I tryed to apply this patch to openldap.m4

I really have no idea how to go ahead

  • Is there a reason why you have to compile OpenLDAP from sources instead of using the binary package which Ubuntu provides for you? – Janne Pikkarainen Jan 31 at 11:47
  • 1
    Actually for personal curiosity – DDS Jan 31 at 12:01
  • Oh, that's perfect then, go on! I guess you have libdb-dev package installed? – Janne Pikkarainen Jan 31 at 12:08
  • Yes, it's installed. – DDS Jan 31 at 13:08

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.