准备在postfix代码中添加对redis的支持
编译路径
SYSLIBS = -L/usr/local/lib -lpcre -ldb -lnsl -lresolv -L/study/database/nosql/redis-2.8.1/deps/hiredis -lhiredis
INC_DIR = ../../include -I/study/database/nosql/redis-2.8.1/deps/hiredis
其中某台计算机是正常,但是到了另一台后,
出现
<20>Dec 12 15:06:08 emos postfix-steelport/master[12592]: warning: process /usr/libexec/postfix/smtp pid 17013 exit status 127
<20>Dec 12 15:06:08 emos postfix-steelport/master[12592]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling
smtp进程无法启动,而且没有任何日志输出。
手工运行一下出现
/usr/libexec/postfix/smtp: error while loading shared libraries: libhiredis.so.0.10: cannot open shared object file: No such file or directory
ldd /usr/libexec/postfix/smtp
linux-vdso.so.1 => (0x00007fff544e1000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x0000003039000000)
libmysqlclient.so.18 => /lib64/libmysqlclient.so.18 (0x0000003cb2800000)
libz.so.1 => /lib64/libz.so.1 (0x0000003028c00000)
libm.so.6 => /lib64/libm.so.6 (0x0000003027c00000)
libdb-4.7.so => /lib64/libdb-4.7.so (0x000000302ac00000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x000000303b000000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003029c00000)
libhiredis.so.0.10 => not found
libc.so.6 => /lib64/libc.so.6 (0x0000003028000000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003028800000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003028400000)
librt.so.1 => /lib64/librt.so.1 (0x0000003029000000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003034c00000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003033c00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003027800000)
我清晰的记得,在另一台服务器上,没有使用redis的静态库
当然可以,ln -s libhiredis.so libhiredis.so.0.10
觉得还是查找一下,看了一下redis c客户端hiredis的make 文件,
使用make static 编译后,没有so文件。
然后再postfix的src/smtp目录下 make一下 ,
最后运行
ldd /usr/libexec/postfix/smtp
linux-vdso.so.1 => (0x00007fff5f5ff000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x0000003039000000)
libmysqlclient.so.18 => /lib64/libmysqlclient.so.18 (0x0000003cb2800000)
libz.so.1 => /lib64/libz.so.1 (0x0000003028c00000)
libm.so.6 => /lib64/libm.so.6 (0x0000003027c00000)
libdb-4.7.so => /lib64/libdb-4.7.so (0x000000302ac00000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x000000303b000000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003029c00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003028000000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003028800000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003028400000)
librt.so.1 => /lib64/librt.so.1 (0x0000003029000000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003034c00000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003033c00000)
/lib64/ld-linux-x86-64.so.2 (0x0000003027800000)
阅读(5019) | 评论(1) | 转发(0) |