Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2137192
  • 博文数量: 227
  • 博客积分: 10521
  • 博客等级: 上将
  • 技术积分: 3452
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-20 14:59
个人简介

低调做人,高调做事!

文章分类

全部博文(227)

文章存档

2013年(4)

2012年(8)

2011年(16)

2010年(24)

2009年(92)

2008年(83)

分类: LINUX

2010-11-10 16:12:14

原来安装php扩展的时候,都比较简单,这次安装imap扩展却遇到很大的麻烦,不是库文件缺少,就是路径不正确,最后还是搞定了,记录下安装过程。

如果对php进行模块扩展,重新编译PHP,这个过程比较痛苦,我的方法都是采用编译模块为*.so的方式,简单,方便,不用去其他地方找模块源码包,php源码自带了。


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
阅读(14722) | 评论(1) | 转发(2) |
给主人留下些什么吧!~~

chinaunix网友2010-11-10 20:28:39

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com