OpenLDAP – error: BDB/HDB: BerkeleyDB not available

Dec-21st-2011

Today, I was installing “openldap-2.4.28.tgz” package and I got below error.

[root@piyush openldap-2.4.28]# ./configure –with-tls=openssl

configure: error: BDB/HDB: BerkeleyDB not available

After reading installation doc of openldap and README file, found that Berkeley DB is required for slapd.

SLAPD:  BDB and HDB backends require Oracle Berkeley DB 4.4 – 4.8, or 5.0 – 5.1. It is highly recommended to apply the patches from Oracle for a given release.

So I downloaded DB4 and installed via below steps  :-

[root@piyush ~]#  cd  /opt

[root@piyush opt]#  wget  http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz

[root@piyush opt]#  tar –zxvf  db-4.8.30.NC.tar.gz

[root@piyush opt]#   cd db-4.8.30.NC

[root@piyush db-4.8.30.NC]#  cd  build_unix
[root@piyush db-4.8.30.NC]# ../dist/configure –prefix=/usr/local/db4
[root@piyush db-4.8.30.NC]#  make
[root@piyush db-4.8.30.NC]#  make install

After installing DB4, just set the environment variables:-

CPPFLAGS=”-I/usr/local/db4/include”

export CPPFLAGS

LDFLAGS=”-L/usr/local/db4/lib -R/usr/local/db4/lib”

export LDFLAGS

LD_LIBRARY_PATH=/opt/db-4.8.30.NC/build_unix/.libs

export LD_LIBRARY_PATH

Now try to install openldap, hope you will not get any error :-

[root@piyush db-4.8.30.NC]# cd ../openldap-2.4.28

[root@piyush openldap-2.4.28]# ./configure –with-tls=openssl

[root@piyush openldap-2.4.28]# make depend

[root@piyush openldap-2.4.28]# make

[root@piyush openldap-2.4.28]# make test

[root@piyush openldap-2.4.28]# make install

======================================================================

Enjoy Linux !!!

Mega World News Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google Yahoo Buzz StumbleUpon Weekend Joy

Add A Comment

*