VPS侦探论坛

 找回密码
 注册
查看: 3183|回复: 0

CentOS 7安装lnmp1.3后折腾php_imap记录

[复制链接]
发表于 2016-7-6 17:22:26 | 显示全部楼层 |阅读模式

按照https://www.vpser.net/manage/lnmp-php-install-ext.html的教程,imap编译不成功,报错:
  1. configure: error: Cannot find imap library (libc-client.a). Please check your c-client install.
复制代码
找了下教程,先安装:libc-client-devel,但系统提示已安装。需要这样:
  1. ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so
  2. /usr/local/php/bin/phpize
  3. ./configure --with-php-config=/usr/local/php/bin/php-config --with-kerberos --with-imap-ssl
  4. make && make install
复制代码
才能编译成功。

但是第二次进行上面步骤的时候,系统报了另一个错误:
  1. configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
复制代码
再次找资料,需要这样:
  1. wget ftp://ftp.cac.washington.edu/imap/imap-2007f.tar.gz;
  2. tar -zxf imap-2007f.tar.gz;
  3. cd imap-2007f;
  4. make lr5 PASSWDTYPE=std SSLTYPE=unix.nopwd EXTRACFLAGS=-fPIC IP=4;
  5. mkdir /usr/local/src/imap-2007f/;
  6. mkdir /usr/local/src/imap-2007f/include/;
  7. mkdir /usr/local/src/imap-2007f/lib/;
  8. cp c-client/*.h /usr/local/src/imap-2007f/include/;
  9. cp c-client/*.c /usr/local/src/imap-2007f/lib/;
  10. cp c-client/c-client.a /usr/local/src/imap-2007f/lib/libc-client.a;
复制代码
这时再回到~/lnmp1.3-full/src/php-7.0.7/ext/imap目录下
  1. /usr/local/php/bin/phpize;
  2. ./configure --with-php-config=/usr/local/php/bin/php-config --with-kerberos --with-imap-ssl --with-imap=/usr/local/src/imap-2007f;
  3. make && make install;
复制代码
终于编译成功了,再在php.ini上加入extension="imap.so",保存后lnmp restart,搞定。

[ 本帖最后由 malsony 于 2016-7-12 00:32 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-17 09:51 , Processed in 0.025098 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表