Search code examples
phpcentosmcrypt

CentOS 6/PHP5 - Can't Install mcrypt?


I am trying to install mcrypt for PHP 5 on CentOS 6. I have the EPEL repository all set up, but whenever I try to install it, I get the following.

yum --enablerepo=epel install php-mcrypt
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: dallas.tx.mirror.xygenhosting.com
* epel: fedora-epel.mirror.lstn.net
* extras: centos.mirror.lstn.net
* updates: mirror.rackspace.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.x86_64 0:5.1.6-5.el5 will be installed
--> Processing Dependency: php-api = 20041225 for package: php-mcrypt-5.1.6-    5.el5.x86_64
--> Processing Dependency: libmcrypt.so.4()(64bit) for package: php-mcrypt-5.1.6-    5.el5.x86_64
--> Running transaction check
---> Package libmcrypt.x86_64 0:2.5.7-5.el5 will be installed
---> Package php-mcrypt.x86_64 0:5.1.6-5.el5 will be installed
--> Processing Dependency: php-api = 20041225 for package: php-mcrypt-5.1.6-    5.el5.x86_64
--> Finished Dependency Resolution
Error: Package: php-mcrypt-5.1.6-5.el5.x86_64 (epel)
       Requires: php-api = 20041225
       Installed: php-common-5.3.3-14.el6_3.x86_64 (@updates)
           php-api = 20090626
       Available: php-common-5.3.3-3.el6_2.8.x86_64 (base)
           php-api = 20090626
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

I saw it requires php-api, so I tried updating that, but it says it's already all up to date.


Solution

  • I have the EPEL repository all set up...

    Except you don't, because it's trying to install the EL5 package on your EL6 system. Verify your EPEL installation and try again.