配置LDAP时Berkeley DB不匹配错误

dig*_*123 3 linux redhat berkeley-db openldap

我正在配置OPENLDAP 2.4.35.在Redhat Linux上,我已经安装了Berkley DB 4.8.30作为先决条件.我还检查了OPENLDAP的README文件的版本兼容性,该文件说:

    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.
Run Code Online (Sandbox Code Playgroud)

我仍然收到此错误:

    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... 8
    checking if Berkeley DB version supported by BDB/HDB backends... yes
    checking for Berkeley DB link (-ldb-4.8)... yes
    *checking for Berkeley DB library and header version match... no
    configure: error: Berkeley DB version mismatch*
Run Code Online (Sandbox Code Playgroud)

请帮助

dig*_*123 7

现在配置工作正常.我必须正确导出Berkeley DB的库路径:

export LD_LIBRARY_PATH="/root/db-6.0.20/build_unix/.libs"
Run Code Online (Sandbox Code Playgroud)