下載源碼編譯安裝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的主目錄沒有定義引發的~