Installing mcrypt extension on CentOS 6

Tyler James asked:

I am trying to install the mcrypt extension on my CentOS 6 VPS. I have done the EPEL rpm and then updated everything. Now, I keep getting this error and I’ve also installed php-api.

[root@vps ~]# yum -y install php-mcrypt
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * updates:
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
--> 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-23.el6_4.x86_64 (@updates)
               php-api = 20090626
           Available: php-common-5.3.3-22.el6.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

AmI skipping/missing something important? Please don’t down vote this.

Thank you!

My answer:

You installed the wrong EPEL RPM.

You are running CentOS 6, but you installed the epel-release RPM for EPEL 5.

Remove it and install the RPM for EPEL 6.

View the full question and answer on Server Fault.

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