VPS侦探论坛

 找回密码
 注册
查看: 3796|回复: 1

CentOS7 编译 PHP 的 imap 扩展出错,EPEL源内丢失 uw-imap-devel 。(官方已修复)

[复制链接]
发表于 2017-8-1 01:05:13 | 显示全部楼层 |阅读模式

EPEL源 在 2017年7月31日 14:57 更新 CentOS7 的 uw-imap 到 2007f-16.el7 后,
已不存在以下问题:

安装 LNMP1.4版 后,编译 PHP5.6 的 imap 扩展 时:
{
cd /root/lnmp1.4/src
tar jxf php-5.6.31.tar.bz2
cd /root/lnmp1.4/src/php-5.6.31/ext/imap
/usr/local/php/bin/phpize
ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so
./configure --with-php-config=/usr/local/php/bin/php-config --with-kerberos --with-imap-ssl
}
出错:
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
经百度搜索,发现是 imap 扩展缺少依赖包导致的。

命令运行:yum install libc-client uw-imap-devel
安装成功:libc-client-2007f-14.el7.x86_64 (EPEL源)
查找不到:uw-imap-devel

在 EPEL源 的软件库内查找不到 uw-imap-devel,EPEL源 其他镜像也查找不到 uw-imap-devel,目录内只有:
uw-imap-2007f-14.el7.x86_64.rpm                    12-Jul-2017 00:05     67K
uw-imap-utils-2007f-14.el7.x86_64.rpm              12-Jul-2017 00:05     50K


在安装过 LNMP(包含 imap) 的 CentOS 7 使用 yum update 更新系统,出现以下问题:

正在解决依赖关系
--> 正在检查事务
---> 软件包 libc-client.x86_64.0.2007f-4.el7.1 将被 升级
--> 正在处理依赖关系 libc-client(x86-64) = 2007f-4.el7.1,它被软件包 uw-imap-devel-2007f-4.el7.1.x86_64 需要
---> 软件包 libc-client.x86_64.0.2007f-14.el7 将被 更新
--> 解决依赖关系完成
错误:软件包:uw-imap-devel-2007f-4.el7.1.x86_64 (@epel)
          需要:libc-client(x86-64) = 2007f-4.el7.1
          正在删除: libc-client-2007f-4.el7.1.x86_64 (@epel)
              libc-client(x86-64) = 2007f-4.el7.1
          更新,由: libc-client-2007f-14.el7.x86_64 (epel)
              libc-client(x86-64) = 2007f-14.el7
您可以尝试添加 --skip-broken 选项来解决该问题
您可以尝试执行:rpm -Va --nofiles --nodigest


谷歌搜索:uw-imap-devel-2007f-4.el7.1.x86_64
找到: http://dl.marmotte.net/rpms/redhat/el7/x86_64/uw-imap-2007f-4.el7.1/   其目录下:
build.log.gz                                       29-Aug-2014 17:53     35K
libc-client-2007f-4.el7.1.x86_64.rpm               29-Aug-2014 17:56    570K
root.log.gz                                        29-Aug-2014 17:53    3839
state.log.gz                                       29-Aug-2014 17:53     308
uw-imap-2007f-4.el7.1.src.rpm                      29-Aug-2014 17:56      2M
uw-imap-2007f-4.el7.1.x86_64.rpm                   29-Aug-2014 17:56     75K
uw-imap-debuginfo-2007f-4.el7.1.x86_64.rpm         29-Aug-2014 17:56      1M
uw-imap-devel-2007f-4.el7.1.x86_64.rpm             29-Aug-2014 17:56     62K
uw-imap-static-2007f-4.el7.1.x86_64.rpm            29-Aug-2014 17:56    466K
uw-imap-utils-2007f-4.el7.1.x86_64.rpm             29-Aug-2014 17:56     58K



说明 EPEL源 在 2017年7月12日 更新 CentOS7 的 uw-imap 到 2007f-14.el7 后,丢失了 uw-imap-debuginfo,uw-imap-devel,uw-imap-static 。

目前自己用的解决办法:
先安装:libc-client
yum install libc-client


再强制安装:uw-imap-devel
rpm -ivh --force --nodeps http://dl.marmotte.net/rpms/redhat/el7/x86_64/uw-imap-2007f-4.el7.1/uw-imap-devel-2007f-4.el7.1.x86_64.rpm

然后,再编译 PHP 的 imap 扩展就成功了。
{
cd /root/lnmp1.4/src
tar jxf php-5.6.31.tar.bz2
cd /root/lnmp1.4/src/php-5.6.31/ext/imap
/usr/local/php/bin/phpize
ln -s /usr/lib64/libc-client.so /usr/lib/libc-client.so
./configure --with-php-config=/usr/local/php/bin/php-config --with-kerberos --with-imap-ssl
make && make install
}

等待 EPEL源 更新出 uw-imap-devel 后,使用 yum update 更新 uw-imap-devel 到匹配版本。

似乎 LNMP1.4版 内,原来就有集成安装 CentOS7 的 libc-client 与 uw-imap-devel 的命令。

[ 本帖最后由 Aeon_愛戀 于 2017-8-5 23:52 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-8-1 09:20:14 | 显示全部楼层


libc-client 这个是centos官方源里的,先卸载后,yum install 时加上 --disablerepo=epel 参数使用官方仓库安装
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-25 17:17 , Processed in 0.025376 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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