安装 php 7.2 时 httpd-mmn 版本冲突?

httpd-mmn version conflict when installing php 7.2?

我正在尝试在 centos 6 上安装 php 7.2,结果出现以下错误。我按照以下说明的步骤操作:LINK.

从其他帖子我了解到这可能是因为我从源代码构建了 httpd 2.4。但是我找不到如何解决它的好方法。我清理了 yum 缓存并更新了 yum 等,如其他帖子中所见,但没有成功。 解决这个问题的正确方法是什么?

我是否也应该从源代码构建 php 7.2?

Error: Package: php-7.2.3-1.el6.remi.x86_64 (remi-php72)
           Requires: httpd-mmn = 20051115
           Installed: httpd-2.4.12-1.x86_64 (installed)
               httpd-mmn = 20120211
           Available: httpd-2.2.15-59.el6.centos.x86_64 (base)
               httpd-mmn = 20051115
           Available: httpd-2.2.15-60.el6.centos.4.x86_64 (updates)
               httpd-mmn = 20051115
           Available: httpd-2.2.15-60.el6.centos.5.x86_64 (updates)
               httpd-mmn = 20051115
           Available: httpd-2.2.15-60.el6.centos.6.x86_64 (updates)
               httpd-mmn = 20051115  You could try using --skip-broken to work around the problem  You could try running: rpm -Va --nofiles
--nodigest

mod_php 在 remi 仓库中总是针对基本仓库中的默认 httpd 版本构建(因此 CentOS 6 中的版本 2.2)。

不知道你的 httpd 2.4 是从哪里来的,但你不能用它来使用 mod_php(而且看起来像是一个过时的版本...)。

顺便说一句,我建议切换到 FPM,这是一种更现代的执行 PHP 脚本的方式,如果您还需要 HTTP2,则这是强制性的。

PHP Configuration Tips

如果实在需要httpd 2.4,也可以换成CentOS 7