0

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?

1

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.

| improve this answer | |
  • It is enabled (I believe) since I already have php5.6 (checked with phpinfo();) but no mcrypt. Ok I won't use it but what if this conflict cause more errors in the future, like updates e.t.c? – Ergec Jan 16 '19 at 18:55
  • You still need to enable the repo. You can't get packages from a disabled repo. – Michael Hampton Jan 16 '19 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.