系统:Ubuntu20.04
宝塔PHP7.3

问题:宝塔面板无法安装imap扩展

提示报错

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 )

解决方法

安装Kerberos libraries

apt-get install libkrb5-dev

执行命令

apt-get -y install libpam0g-dev libc-client2007e libc-client2007e-dev
        ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so
        cd /www/server/php/73/src/ext/imap
        /www/server/php/73/bin/phpize
        ./configure --with-php-config=/www/server/php/73/bin/php-config --with-imap --with-imap-ssl --with-kerberos=/usr
        make && make install

写入配置文件

echo 'extension = imap.so' >> /www/server/php/73/etc/php.ini

最后去宝塔重启php

Last modification:December 2, 2022