安装iamp模块,编译报错configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.

时间:2024-01-10 10:15:08

yum install libc-client-devel
cd /root/lnmp1.0-full/php-5.3.17/ext/imap
/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config --with-kerberos --with-imap-ssl

执行./configure --with-php-config=/usr/local/php/bin/php-config
后提示
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.

环境lnmp最新版本

updatedb
locate libc-client
locate 找到libc-client.so 位置后用ln -s 命令做个软连接到/usr/lib/
ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.a
ln -s /usr/lib64/libkrb5.so /usr/lib/libkrb5.so
./configure --with-php-config=/usr/local/php/bin/php-config --with-kerberos --with-imap-ssl

make &&make install

编译通过!!

vi /usr/local/php/etc/php.ini
找到extension,在后面加一条:extension = "imap.so"

保存,重启 服务