BerkeleyDB4.2 + openldap-2.2.19安装手记

王朝网络·other·作者佚名  2006-01-09
宽屏版  字体: |||超大  

今天想研究一下LDAP的东西,于是安装试用。在查阅了网上一些资料便动手.

可是却尽了一些周折..... 真是郁闷!

下面是安装的过程遇到的问题及解决方式。

统: Freebsd 4.8 release

安装软件: db-4.2.52.NC.tar.gz,openldap-2.2.19.tar.gz

安装过程:

$tar zxf db-4.2.52.NC.tar.gz

$cd db-4.2.52/build_unix

$../dist/configure

$make

$su

#make install

以上安装BerkeleyDB4.2成功。 但下面就开始有问题啦!

接下来安装openldap

$tar zxf openldap-2.2.19.tar.gz

$cd openldap-2.2.19

$su

#env CPPFLAGS=-I/usr/local/BerkeleyDB.4.2/include LDFLAGS=-L/usr/local/BerkeleyDB.4.2/lib ./configure --enable-bdb

发现如下报错:(我只拿了最后几行出来)

checking for ctime_r... yes

checking for gethostbyname_r... no

checking for gethostbyaddr_r... no

checking number of arguments of ctime_r... 2

checking for db.h... yes

checking for Berkeley DB link (-ldb42)... no

checking for Berkeley DB link (-ldb-42)... no

checking for Berkeley DB link (-ldb-4.2)... yes

checking for Berkeley DB version match... no

configure: error: Berkeley DB version mismatch

我分别安装了DB4.2 DB4.3 情况都一样只是最后提示变为:

checking for ctime_r... yes

checking for gethostbyname_r... no

checking for gethostbyaddr_r... no

checking number of arguments of ctime_r... 2

checking for db.h... yes

checking for Berkeley DB link (default)... no

checking for Berkeley DB link (-ldb43)... no

checking for Berkeley DB link (-ldb-43)... no

checking for Berkeley DB link (-ldb-4.3)... no

checking for Berkeley DB link (-ldb-4-3)... no

checking for Berkeley DB version match... no

configure: error: Berkeley DB version mismatch

安装到到这里时, 我就到chinaunix.net论坛发文求助. 同时去www.google.com搜索相关人员遇到的问题。结果发现网上很多人也有同样问题。

郁闷啊。我一直以为是版本问题。结果将Berkeley DB 4.1, 4.2, 4.3都装了,还是一样。

根据网上资料估计上是库的问题了。于是在openldap目录下。尝试下面操作。

./configure --enable-bdb --libdir=/usr/local/BerkeleyDB.4.2/lib --includedir=/usr/local/BerkeleyDB.4.2/include

这样直接编译 openldap也不行.

用网上某些高人的说法如下操作也不行.

env CPPFLAGS=-I/usr/local/BerkeleyDB.4.2/include LDFLAGS=-L/usr/local/BerkeleyDB.4.2/lib ./configure --enable-bdb

错误依然。

最后,我发狠了!!

我进行了如下操作。

$su root

#cp /usr/local/BerkeleyDB.4.2/include/* /usr/include/

#cp /usr/ local/BerkeleyDB.4.2/lib/* /usr/lib

然后在进入openldap目录进行

./configure --enable-bdb --libdir=/usr/local/BerkeleyDB.4.2/lib --includedir=/usr/local/BerkeleyDB.4.2/include

结果成功了。

尔后进行的make depend ; make ; make test 都成功。

因不想某些朋友再遇到象我这么郁闷的事情。 赶紧这里公布一下这个安装手记. 希望对某些和我一样郁闷了2个小时的家伙有用哦。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有