php在make时,报错:make: *** [libphp5.la] Error 1
已解决,原因在于:在配置环境时
--with-libxml-dir=/usr/local/libxml2 应该改为:--with-libxml-dir=/usr/local/include/libxml2

在编译postfix时,使用命令:make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/mysql5/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/local/sasl2/include/sasl -I/usr/local/BerkeleyDB/include -DUSE_TLS -I/usr/local/ssl/include/openssl ' 'AUXLIBS=-L/usr/local/mysql5/lib/mysql -lmysqlclient -lz -lm -L/usr/local/sasl2/lib -lsasl2 -L/usr/local/BerkeleyDB/lib -L/usr/local/ssl/lib -lssl -lcrypto'
时报错提示:
No <db.h> include file found.
Install the appropriate db*-devel package first.
See the RELEASE_NOTES file for more information.
make: *** [Makefiles] Error 1
make: *** [makefiles] Error 2
解决方法:重新编译安装 db-4.5.20.tar.gz 后问题解决

在上面配置环境完成后,开始编译,结果出现下列错误:
dict_mysql.c:173:19: mysql.h: No such file or directory
dict_mysql.c:198: error: syntax error before "MYSQL"
dict_mysql.c:198: warning: no semicolon at end of struct or union
dict_mysql.c:206: error: syntax error before '}' token
dict_mysql.c:257: error: `dict_mysql' undeclared (first use in this function)
dict_mysql.c:257: error: (Each undeclared identifier is reported only once
dict_mysql.c:257: error: for each function it appears in.)
dict_mysql.c:257: error: syntax error before ')' token
dict_mysql.c: In function `dict_mysql_lookup':
dict_mysql.c:287: error: `dict_mysql' undeclared (first use in this function)
dict_mysql.c:287: error: syntax error before ')' token
dict_mysql.c:382: error: syntax error before '*' token
dict_mysql.c:383: warning: no previous prototype for 'dict_mysql_find_host'
dict_mysql.c: In function `dict_mysql_find_host':
dict_mysql.c:390: error: `PLDB' undeclared (first use in this function)
dict_mysql.c: At top level:
dict_mysql.c:414: error: syntax error before '*' token
dict_mysql.c:414: error: syntax error before '*' token
dict_mysql.c:416: warning: no previous prototype for 'dict_mysql_get_active'
dict_mysql.c: In function `dict_mysql_get_active':
dict_mysql.c:418: error: `host' undeclared (first use in this function)
dict_mysql.c:422: error: `PLDB' undeclared (first use in this function)
dict_mysql.c:443: error: `dbname' undeclared (first use in this function)
dict_mysql.c:443: error: `username' undeclared (first use in this function)
dict_mysql.c:443: error: `password' undeclared (first use in this function)
dict_mysql.c: In function `dict_mysql_event':
dict_mysql.c:456: error: `host' undeclared (first use in this function)
dict_mysql.c:456: error: syntax error before ')' token
dict_mysql.c: At top level:
dict_mysql.c:469: error: syntax error before '*' token
dict_mysql.c:469: error: syntax error before '*' token
dict_mysql.c:474: warning: no previous prototype for 'plmysql_query'
dict_mysql.c: In function `plmysql_query':
dict_mysql.c:475: error: `host' undeclared (first use in this function)
dict_mysql.c:476: error: `MYSQL_RES' undeclared (first use in this function)
dict_mysql.c:481: warning: format argument is not a pointer (arg 2)
dict_mysql.c:490: warning: format argument is not a pointer (arg 2)
dict_mysql.c: At top level:
dict_mysql.c:503: error: syntax error before '*' token
dict_mysql.c:504: warning: 'plmysql_connect_single' was used with no prototype before its definition
dict_mysql.c: In function `host_init':
dict_mysql.c:667: error: `host' undeclared (first use in this function)
dict_mysql.c:667: error: syntax error before ')' token
dict_mysql.c: In function `dict_mysql_close':
dict_mysql.c:711: error: `dict_mysql' undeclared (first use in this function)
dict_mysql.c:711: error: syntax error before ')' token
dict_mysql.c: At top level:
dict_mysql.c:730: error: syntax error before '*' token
dict_mysql.c:731: warning: 'plmysql_dealloc' was used with no prototype before its definition
dict_mysql.c: In function `plmysql_dealloc':
dict_mysql.c:734: error: `PLDB' undeclared (first use in this function)
make: *** [dict_mysql.o] Error 1
make: *** [update] Error 1
后分析发现:文件mysql.h的正确路径是:/usr/local/mysql5/include/mysql/mysql.h,而我们前面配置环境时设置的路径为:CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include/mysql 和 AUXLIBS=-L/usr/local/mysql/lib/mysql,显然路径不对。改为/usr/local/mysql5/include/mysql 和 usr/local/mysql5/lib/mysql 后该错误没有出现过。
/usr/local/ssl/include/openssl
继续编译又有错误:libmysqlclient.so.15: cannot open shared object file: No such file or directory
解决方法:把libmysqlclient.so.15文件copy到/usr/lib下(放在标准lib目录下),重新编译解决问题。
 
make install时应该这样输入:
install_root: [/] /
  tempdir: [/webmail/src/postfix-2.4.5] /tmp
  config_directory: [/etc/postfix] /webmail/postfix/etc/postfix
  daemon_directory: [/usr/libexec/postfix] /webmail/postfix/usr/libexec  
command_directory: [/usr/sbin] /webmail/postfix/usr/sbin
  queue_directory: [/var/spool/postfix] /webmail/postfix/var/spool/postfix
  sendmail_path: [/usr/sbin/sendmail] /usr/sbin/sendmail
  newaliases_path: [/usr/bin/newaliases] /usr/bin/newaliases
  mailq_path: [/usr/bin/mailq] /usr/bin/mailq
  mail_owner: [postfix] postfix
  setgid_group: [postdrop] postdrop
html_directory: [no] /webmail/www/postfix_html
manpages: [/webmail/man] /webmail/postfix/man
readme_directory: [no]