Install libmcrypt el6

When trying to compile PHP I noticed the libmcrypt package is no longer provided with EL6 / CentOS 6,

checking whether to enable multibyte string support… no
checking whether to enable multibyte regex support… yes
checking whether to check multibyte regex backtrack… yes
checking for external libmbfl… no
checking for mcrypt support… yes
configure: error: mcrypt.h not found. Please reinstall libmcrypt.

Checking if the package exists in the default repos shows it doesn’t,

# yum search libmcrypt
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirrors.versaweb.com
* extras: mirrors.usc.edu
* updates: mirrors.easynews.com
Warning: No matches found for: libmcrypt
No Matches found

You need to obtain this from the epel repos now at http://dl.fedoraproject.org/pub/epel/6/x86_64/ , at the time of writing the version is 2.5.8-9 so you can install this with,

mcryptver=2.5.8-9
arch=x86_64
rpm -Uhv http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-$mcryptver.el6.$arch.rpm
rpm -Uhv http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-devel-$mcryptver.el6.$arch.rpm

An example,

# mcryptver=2.5.8-9
# arch=x86_64
# rpm -Uhv http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-$mcryptver.el6.$arch.rpm
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm
warning: /var/tmp/rpm-tmp.BoLykl: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing… ########################################### [100%]
1:libmcrypt ########################################### [100%]
# rpm -Uhv http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-devel-$mcryptver.el6.$arch.rpm
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-devel-2.5.8-9.el6.x86_64.rpm
warning: /var/tmp/rpm-tmp.6SW2Vh: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing… ########################################### [100%]
1:libmcrypt-devel ########################################### [100%]

Leave a Reply

Your email address will not be published. Required fields are marked *