httpd-mmn = 20051115 required by “yum install php”

走远了吗. 提交于 2020-01-05 03:32:38

问题


I installed httpd (apache 2.4.6) from source and now I want to install PHP. But yum install php spits out the error:

Error: Package: php-5.3.3-40.el6_6.x86_64 (updates)
       Requires: httpd-mmn = 20051115
       Installed: httpd-2.4.6-1.x86_64 (installed)
           httpd-mmn = 20120211
       Available: httpd-2.2.15-39.el6.centos.x86_64 (base)
           httpd-mmn = 20051115

I've also tried with webtatic, ius and remi. All with the same error. I built apache using rpm-build.

$ httpd -v
Server version: Apache/2.4.6 (Unix)

回答1:


$ sudo nano /etc/yum.conf

Remove httpd* and php* from this line:

exclude=apache* bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*

Save and close yum.conf

Try again:

$ sudo yum install php



回答2:


The php package you are trying to install is actually mod_php, which is compiled against a specific Apache HTTP Server ABI (httpd-mmn). Stock php, IUS, Webtatic, and Remirepo all build against stock httpd. Some Remi packages build against stock, but other build against versions of httpd he ships. Compiling your own httpd from source will typically mean having to compile your own mod_php as well.

If you just need php, not mod_php specifically, you can use php-fpm instead, and that will avoid this problem entirely. IUS currently ships php55u-fpm, php56u-fpm, and php70u-fpm packages if you need a more recent version than the stock 5.3.




回答3:


there is no such line

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release



回答4:


I you start to build from sources (Apache), you have to build nearly "everything" from sources.

Of course you can also switch to php-fpm.



来源:https://stackoverflow.com/questions/27872457/httpd-mmn-20051115-required-by-yum-install-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!