1、進入安裝目錄
cd /path/ext/imap
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config
就是到這步報錯了,如果妳碰到這樣的錯誤:
This c-client library is built with Kerberos support.
Add --with-kerberos to your configure line. Check config.log for details
utf8_mime2text() has new signature
以上2個錯誤都是由於缺少 libc-client-* 軟件包引起,由於我是Centos系統,就直接yum升級吧
yum -y install libc-client-*
安裝完畢後,再次編譯,
./configure --with-php-config=/usr/local/webserver/php/bin/php-config
這次的錯誤不壹樣,如下:
configure: error: Kerberos libraries not found.
Check the path given to --with-kerberos (if no path is given, searches in /usr/kerberos, /usr/local and /usr )
既然提示少參數,就加上該參數吧,
./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-kerberos=/usr
註意:這裏有3個路徑可以選擇,於是就壹個壹個試壹下,很幸運的是前面2個都不能編譯通過,只有 --with-kerberos=/usr 可以,但是還是有報錯,如下:
This c-client library is built with SSL support
看來離希望越來越近了,於是就加上 --with-imap-ssl=/usr 參數,終於編譯通過了,真不容易。
最後完整的編譯 imap 模塊參數如下:
./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-kerberos=/usr --with-imap-ssl=/usr
make
make install