免费注册 查看新帖 |

Chinaunix

广告
  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3244 | 回复: 11
打印 上一主题 下一主题

[ldap] 新手问个老问题!关于openldap的编译问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-08-17 14:17 |只看该作者 |倒序浏览
小弟刚接触linux和openldap没多久,问了一个别人问过的问题,俺看了很久没看懂!
系统如下:
redhat 9.0
cyrus-sasl-2.1.19
db-4.2.52
openldap-2.2.15
首先安装的是db-4.2.52
# cd build_unix &&
../dist/configure --prefix=/usr \
    --enable-compat185 \
    --enable-cxx &&
make &&
make docdir=/usr/share/doc/db-4.2.52 install
正常

接着安装cyrus-sasl-2.1.19
#./configure && make && make install
#ln -s /usr/local/lib/sasl2 /usr/lib/sasl2
#echo /usr/local/lib >;>; /etc/ld.so.conf
#echo /usr/local/lib/sasl2 >;>; /etc/ld.so.conf
#ldconfig
正常

接下来安装openldap
#./configure --prefix=/usr --sysconfdir=/etc --disable-debug \
   --libexecdir=/usr/sbin --enable-ldbm
(在这里由于我不知道我上面装的是db属于ldbm还是bdb的,我还把--enable-ldbm改成--enable-bdb,一样会产生下面的问题)
#make depend
#make
#make test
此时就出错了

cd tests; make test
make[1]: Entering directory `/data/zhanghb/openldap-2.2.15/tests'
make[2]: Entering directory `/data/zhanghb/openldap-2.2.15/tests'
Initiating LDAP tests for BDB...
Running ./scripts/all...
>;>;>;>;>; Executing all LDAP tests for bdb
>;>;>;>;>; Starting test000-rootdse ...
running defines.sh
Starting slapd on TCP/IP port 9011...
Using ldapsearch to retrieve the root DSE...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
./scripts/test000-rootdse: line 48: kill: (23015) - No such process
ldap_bind: Can't contact LDAP server (-1)
>;>;>;>;>; Test failed
>;>;>;>;>; ./scripts/test000-rootdse failed (exit 1)
make[2]: *** [bdb-yes] Error 1
make[2]: Leaving directory `/data/zhanghb/openldap-2.2.15/tests'
make[1]: *** [test] Error 2
make[1]: Leaving directory `/data/zhanghb/openldap-2.2.15/tests'
make: *** [test] Error 2

谢谢各位大虾帮帮忙!

论坛徽章:
0
2 [报告]
发表于 2004-08-17 17:14 |只看该作者

新手问个老问题!关于openldap的编译问题

我也是一样的问题啊,请各位多多指教,急着用,谢谢!

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
3 [报告]
发表于 2004-08-17 23:36 |只看该作者

新手问个老问题!关于openldap的编译问题

建议你默认安装bdb
cd build_unix
../dist/configure
make
make install
在安装openldap的时候指出bdb的路径就可以了

论坛徽章:
0
4 [报告]
发表于 2004-08-18 10:38 |只看该作者

新手问个老问题!关于openldap的编译问题

原帖由 "py" 发表:
建议你默认安装bdb
cd build_unix
../dist/configure
make
make install
在安装openldap的时候指出bdb的路径就可以了


您好,按照您的方式我重新编译安装,还是会出现类似的问题,现在系统环境及安装过程如下:
系统环境:
redhat 9.0
cyrus-sasl-2.1.19
db-4.2.52
openldap-2.2.15

首先安装的是db-4.2.52
# cd build_unix &&
#../dist/configure
#make
#make install
#echo /usr/local/BerkeleyDB.4.2/lib >;>; /etc/ld.so.conf
#ldconfig
正常

接着安装cyrus-sasl-2.1.19
#./configure && make && make install
#ln -s /usr/local/lib/sasl2 /usr/lib/sasl2
#echo /usr/local/lib >;>; /etc/ld.so.conf
#echo /usr/local/lib/sasl2 >;>; /etc/ld.so.conf
#ldconfig
正常

接下来安装openldap
#env CPPFLAGS="-I/usr/local/BerkeleyDB.4.2/include \
-I/usr/local/include/sasl" LDFLAGS="-L/usr/local/BerkeleyDB.4.2/lib \
-L/usr/local/lib/sasl2" ./configure --prefix=/usr --sysconfdir=/etc \
--disable-debug \
--libexecdir=/usr/sbin
#make depend
#make
#make test
此时就出错了

cd tests; make test
make[1]: Entering directory `/data/openldap-2.2.15/tests'
make[2]: Entering directory `/data/openldap-2.2.15/tests'
Initiating LDAP tests for BDB...
Running ./scripts/all...
>;>;>;>;>; Executing all LDAP tests for bdb
>;>;>;>;>; Starting test000-rootdse ...
running defines.sh
Starting slapd on TCP/IP port 9011...
Using ldapsearch to retrieve the root DSE...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
Waiting 5 seconds for slapd to start...
./scripts/test000-rootdse: line 48: kill: (28483) - No such process
ldap_bind: Can't contact LDAP server (-1)
>;>;>;>;>; Test failed
>;>;>;>;>; ./scripts/test000-rootdse failed (exit 1)
make[2]: *** [bdb-yes] Error 1
make[2]: Leaving directory `/data/openldap-2.2.15/tests'
make[1]: *** [test] Error 2
make[1]: Leaving directory `/data/openldap-2.2.15/tests'
make: *** [test] Error 2

问题依旧,同时还有一个问题,我通过ldd来看openldap编译出来的文件,发现它连接的sasl的库文件是/usr/lib/下的sasl库文件,我在编译的时候不是指定了-I了吗?/usr/lib下的sasl库文件是RedHat系统默认安装的时候自带的,有样会有什么问题吗?

论坛徽章:
0
5 [报告]
发表于 2004-08-18 14:11 |只看该作者

新手问个老问题!关于openldap的编译问题

用了楼上的第一种方法,还是一样的问题,第二种方法不知道应该如何做,请问能不能清楚地说一下如何“把这些库做一个连接,都指向/usr/local/lib/sasl,我是这么做的并且成功了”,把步骤列一下,谢谢了

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
6 [报告]
发表于 2004-08-18 14:58 |只看该作者

新手问个老问题!关于openldap的编译问题

[quote]原帖由 "noway01"]用了楼上的第一种方法,还是一样的问题,第二种方法不知道应该如何做,请问能不能清楚地说一下如何“把这些库做一个连接,都指向/usr/local/lib/sasl,我是这么做的并且成功了”,把步骤列一下,谢谢了[/quote 发表:

如果你做了--without-cyrus-sasl,make test还有问题,那就和sasl没关系了,检查bdb的库是不是加入了LD_LIBRARY_PATH

论坛徽章:
0
7 [报告]
发表于 2004-08-18 15:18 |只看该作者

新手问个老问题!关于openldap的编译问题

不好意思,我比较菜,请问如何将bdb的库加入到LD_LIBRARY_PATH中?

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
8 [报告]
发表于 2004-08-18 15:59 |只看该作者

新手问个老问题!关于openldap的编译问题

在你的profile文件中加入
LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.2/lib
export LD_LIBRARY_PATH

论坛徽章:
0
9 [报告]
发表于 2004-08-18 16:58 |只看该作者

新手问个老问题!关于openldap的编译问题

对不起PY同志,请问是/etc下面的profile文件吗?里面好像是程序一样的,我完全外行,不知道该如何把你写的两句加进去,请手把手教一下好吗?或者你贴一个标准的文件上来我对着改可以吗?

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
10 [报告]
发表于 2004-08-18 19:50 |只看该作者

新手问个老问题!关于openldap的编译问题

My God!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP