php-mcrypt (remi) error while upgrading from php 5.4 to 5.6 on CentOS 7

Ergec asked:

I’m trying to upgrade php on CentOS 7 from 5.4 to 5.6.

When I run

 yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo

I get this dependency error. There were many others, so I removed them with yum and conflicts are gone. But php-mcrypt remains.

--> Finished Dependency Resolution
Error: Package: php-mcrypt-5.4.16-7.el7.x86_64 (epel)
           Requires: php(zend-abi) = 20100525-64
           Installed: php-common-5.6.40-1.el7.remi.x86_64 (@remi-php56)
               php(zend-abi) = 20131226-64
           Available: php-common-5.4.16-46.el7.x86_64 (base)
               php(zend-abi) = 20100525-64
           Available: php-common-5.6.39-1.el7.remi.x86_64 (remi-php56)
               php(zend-abi) = 20131226-64
Error: Package: php-mcrypt-5.4.16-7.el7.x86_64 (epel)
           Requires: php(api) = 20100412-64
           Installed: php-common-5.6.40-1.el7.remi.x86_64 (@remi-php56)
               php(api) = 20131106-64
           Available: php-common-5.4.16-46.el7.x86_64 (base)
               php(api) = 20100412-64
           Available: php-common-5.6.39-1.el7.remi.x86_64 (remi-php56)
               php(api) = 20131106-64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

If I try to remove php-mcrypt

yum remove php-mcrypt

I get this error.

Loaded plugins: fastestmirror, priorities
No Match for argument: php-encrypt
No Packages marked for removal

Only repos I have centos, epel and remi

I’m running centos-release-7-6.1810.2.el7.centos.x86_64

I have 5.6, checked with php -v and phpinfo(); but no mcrypt.

Any suggestions?

My answer:


You installed PHP from the remi-php56 repository, but you have disabled that repository. Enable it and try again.

Also note that your PHP application should not be using php-mcrypt at all.


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.