Looks like BerkeleyDB is not installed which is required to configured openLDAP.
Follow the below steps to install BerkeleyDB.
Downloading Berkeley DB
Extracting files from the downloaded package:
tar zxvf db-5.2.28.tar.gz cd db-5.2.28/build_unix
Create installation path
Configuring Berkeley DB
Compile and install the code
make make install