Home Servers Fixing ‘No package php-mcrypt available’ on CentOS

Fixing ‘No package php-mcrypt available’ on CentOS


No package php-mcrypt

Now this is insane. Since many years, I am looking at this error ‘No package php-mcrypt available’. CentOS still doesn’t has mcrypt by default in its repositories. I can imagine why, but don’t want to fall in discussion.

Let’s fix this from EPEL repos. Along with direct copy-paste codes, I am also providing a method which will stay applicable regardless of updates and version number of files.

First go to this address and select folder depending on version of your CentOS installation. E.g. ‘6’ for CentOS 6.x.x


Now, select path as per system architecture. ‘i386’ folder for 32bit and ‘x86_64’ for 64bit.

Find the file similar to something like ‘epel-release-x-x.noarch.rpm’. Copy the filename by selecting it. Take a note of version number.

Now, look at address bar of your internet browser. Copy the address from browser and paste it in SSH after putting ‘rpm -ivh’. Suffix the whole line with ‘epel-release’ filename, so the code will look like as below.

For 32bit:

rpm -ivh http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

For 64bit:

rpm -ivh http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

After executing above command, do an update.

yum update

You will see that EPEL repo is also listed in the update database list.

Now, try to install the php-mcrypt again by,

yum install php-mcrypt

You will need to answer ‘Y’ for the questions to proceed with the installation.

Done. Let me know of any issue you face.


  1. Kripan Ahuja

    February 17, 2014 at 3:05 pm

    This is real shame, that mcrypt is still not available as default in Centos. Use Ubuntu people.


  2. Simeys

    June 26, 2014 at 6:49 am



  3. Nelson

    July 1, 2014 at 5:56 pm

    Is this patched yet?


Don't hesitate. Comment!

Check Also

Install CSF Firewall with Virtualmin Module

Managing Linux firewall can be pain without graphic interface. ConfigServer firewall comes…