下载源码编译安装postfix,并让它支持mysql。而mysql也是用源码安装的,位置是/usr/local/mysql 按官方的文档用下面指令为编译做准备 make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include/mysql' 'AUXLIBS=-L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lm' 却出错了: /usr/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status make: *** [master] Error 1 make: *** [update] Error 1 后经过搜索得知是libmysqlclient的位置问题,将libmysqlclient.so.16复制到/usr/lib下解决~ 我想将libmysqlclient文件所在的目录加入到path中,也应该能够 此时,本人建立一个postfix用户和postdrop组。却在建立postfix时自做聪明地将该用户的主目录给删除了,以至后来的make install一直出错,搞了两天。 Please specify the group for mail submission and for queue management commands. Specify a group name with a numerical group ID that is not shared with other accounts, not even with the Postfix mail_owner account. You can no longer specify "no" here. setgid_group: [postdrop] postdrop postfix-install: Error: "y" should be "no" or an absolute path name. make: *** [install] Error 1 不管用组名仍是用GID都没法经过,郁闷了一天。后向一网友请教,经他一提醒,回来逐步检查测试才发现是postfix的主目录没有定义引发的~