httpd-mmn issue on CentOS 7 when I only have Nginx/php-fpm

Khom Nazid asked:

I am on CentOS 7. When I do a yum update, it shows me this issue:

** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
php-7.3.4-1.el7.remi.x86_64 has missing requires of httpd-mmn = ('0', '20120211x8664', None)

There’s no httpd or Apache on my server. The repos I have include:

# yum repolist 
Loaded plugins: fastestmirror, replace
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * remi-php72:
 * remi-php73:
 * remi-safe:
 * updates:
repo id                                      repo name                                                                        status
base/7/x86_64                                CentOS-7 - Base                                                                  10,019
epel/x86_64                                  Extra Packages for Enterprise Linux 7 - x86_64                                   13,125
extras/7/x86_64                              CentOS-7 - Extras                                                                   387
mariadb                                      MariaDB                                                                              67
nginx/x86_64                                 nginx repo                                                                          150
remi-php72                                   Remi's PHP 7.2 RPM repository for Enterprise Linux 7 - x86_64                       367
remi-php73                                   Remi's PHP 7.3 RPM repository for Enterprise Linux 7 - x86_64                       307
remi-safe                                    Safe Remi's RPM repository for Enterprise Linux 7 - x86_64                        3,188
robert-gcj/x86_64                            Copr repo for gcj owned by robert                                                    16
robert-pdftk/x86_64                          Copr repo for pdftk owned by robert                                                   3
updates/7/x86_64                             CentOS-7 - Updates                                                                1,840
repolist: 29,475

What do I need to do to remove that error during yum update?

My answer:

You can remove the package. The package named php is only for Apache installations and is not used for nginx/php-fpm. That package is named php-fpm and it is the one you should have installed.

yum remove php

If you don’t already have php-fpm installed, execute this command instead:

yum swap php php-fpm

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.