我正在RHEL5上构建OpenLDAP;我使用了在http://www.linux.com/archive/feature/113607上找到的指令。
一切正常,直到为OpenLDAP运行'./configure‘-记录了以下错误:
*<earlier output snipped>*
checking for gethostbyaddr_r... yes
checking number of arguments of ctime_r... 2
checking number of arguments of gethostbyname_r... 6
checking number of arguments of gethostbyaddr_r... 8
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking for Berkeley DB major version in db.h... 5
checking for Berkeley DB minor version in db.h... 1
checking if Berkeley DB version supported by BDB/HDB backends... yes
**checking for Berkeley DB link (default)... no
configure: error: BDB/HDB: BerkeleyDB not available**
我像个狂人一样用谷歌搜索,但没有成功地找到解决方案--有什么可以探索的地方的提示吗?
谢谢
发布于 2010-10-03 09:37:39
执行yum install db4-devel
(或者只安装预打包的openldap、yum install openldap-servers openldap-clients
发布于 2012-07-27 20:01:46
似乎你正在使用tarball安装,首先你应该安装Berkeley DB。你可以在甲骨文网站Oracle Berkeley DB Downloads上找到它。编译并安装它。
cd db-4.7.25.NC
. ./dist/configure
make
make install
cd /usr/local/BerkeleyDB.4.7/
这将安装BerkeleyDB。现在,您需要提供成功编译OpenLDAP的位置。
export CPPFLAGS="-I/usr/local/BerkeleyDB.4.7/include"
export LDFLAGS="-L/usr/local/BerkeleyDB.4.7/lib -Wl,-R,/usr/local/BerkeleyDB.4.7/lib -Wl,--enable-new-dtags"
# Build OpenLDAP
...
如果没有设置配置文件,那么应该将配置文件添加到/ RPATH
/ LD_LIBRARY_PATH
中。
export LD_LIBRARY_PATH="/usr/local/BerkeleyDB.4.7/lib"
编译完OpenLDAP之后,如果您遇到任何问题,请告诉我。
发布于 2016-04-07 16:07:40
对于CentOS 7,执行yum install libdb-devel
。libdb4-devel对我不起作用。
https://stackoverflow.com/questions/3848064
复制相似问题