Here’s a short note on how to solve it while I still remember. Dependency issues between PHP modules often arise, where some modules cannot be installed with certain versions of PHP after updating or downgrading (especially the latter). It’s helpful when it’s specified which module is causing the dependency issue (for example, complaining about php-common — it was the case for me — when I downgraded from php 8.0 to 7.4 since all engines refused to work on the new, still untested PHP).
The following actions should be taken at your own risk — things could go wrong and you may have to reinstall CentOS. However, if you have nothing to lose, then go ahead.
To solve the issue, uninstall the old module that’s causing the problem with the command:
yum remove name
Where «name» is the name of the problematic module. In some cases, it might be «name80» if your PHP version is 8.0. For example, it could be «php-common80«. After that, install the required version:
yum install name
For example, «yum install php-common74» or simply «yum install php-common«.
If there are still dependency issues, remove another module and so on until the required module is installed with the correct version.
Dependency problems often occur when transitioning from PHP 5.6 to version 7, but this solution worked for me.
UPD. Another useful command is «yum search name«, which shows which packages with that name are available in the system repositories.
yum install php80-php-opcache
Allows you to install a separate module for php8, instead of the one being installed by default for php5.6.
If you encounter dependency issues with a specific package, you can skip it with the command:
yum update —exclude=packagename
For example, «yum update —exclude=php80-php-pecl-memcached«.