Postfix+Cyrus-imap在Redhat Fedora Core 4下安装时出现问题的解决!

 

以前的邮件系统安装在Redhat9.0上,现在需要迁移到FC4上,结果出现了一系列问题,经过两天调试终于解决,现在写出来分享以下,让大家少走弯路:)

问题一:

现象:
configure cyrus-imapd-2.2.3包时,出现错误:
checking for db_open in -ldb... no
configure: error: Berkeley DB 3.x or later was not found. You may need to supply the --with-bdb-libdir or --with-bdb-incdir configure options.

原因:
因为FC4上默认安装的是db-4.3.27 ,而我又自己装了较低的版本,产生冲突!

解决办法:
升级imap,安装cyrus-imapd-2.2.12版本,使用系统默认db4即可!如果自己自定义安装db最好也安装与系统版本相同的包,我试过将系统自带的包卸载,重新装低版本的,也可以(但是要把/usr/local/bdb/include下的文件拷到/usr/include/db4和/usr/include下,否则还是不行)!

问题二:

现象:
make cyrus-imapd-2.2.12时出现
imapopts.h:181: error: array type has incomplete element type(即错误:未完成的数组类型)

原因:
因为FC4使用gcc4.0版本,有些语法不支持,属于bug

解决:
使用patch修复bug,patch内容如下:
--------------------------------------------------

#! /bin/sh /usr/share/dpatch/dpatch-run
## 50-FTBFS-gcc-4.0-fix.dpatch
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix FTBFS when compiling with gcc-4.0, there is imapopts is used before declared

@DPATCH@
diff -urN /emailserver/install/src2/cyrus-imapd-2.2.12/tools/config2header /emailserver/install/src2/cyrus-imapd-2.2.12/tools/config2header
--- /emailserver/install/src2/cyrus-imapd-2.2.12/tools/config2header 2004-06-22 21:02:31.000000000 +0200
+++ /emailserver/install/src2/cyrus-imapd-2.2.12/tools/config2header 2005-06-22 07:56:17.180293688 +0200
@@ -214,7 +214,6 @@
print HFILE <<EOF
IMAPOPT_LAST
};
-extern struct imapopt_s imapopts[];

enum enum_value {
IMAP_ENUM_ZERO = 0,
@@ -260,6 +259,8 @@

print HFILE <<EOF
};
+extern struct imapopt_s imapopts[];
+
#endif /* INCLUDED_IMAPOPTIONS_H */
EOF
;
--------------------------------------------------
把以上内容存为dpatch-run,放在 /usr/share/dpatch/dpatch-run,路径改为你自己的,然后使用命令patch -p0 < dpatch-run
(需要注意缩进,其实就是将语句extern struct imapopt_s imapopts[];放到263行下而已!)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值