How to install MCrypt PHP Extension on CentOS 7.0 x64

September 18, 2014 92.3k views

I am using laravel framework. laravel project running requirement is MCrypt. i m trying to install but i m facing error

HTTP request sent, awaiting response... 404 Not Found
2014-09-18 13:25:27 ERROR 404: Not Found.

2 comments
  • yum install php-mcrypt

    Loaded plugins: fastestmirror

    Loading mirror speeds from cached hostfile

    base: centos.someimage.com

    extras: mirrors.mit.edu

    updates: mirror.lug.udel.edu

    No package php-mcrypt available.

    Error: Nothing to do

  • You can using EPEL (Extra Packages for Enterprise Linux) to install that.

    # install EPEL with yum
    yum -y install epel-release
    # install php-mcrypt
    yum -y install php-mcrypt
    
11 Answers

use root user or sudo
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
rpm -ivh epel-release-7-5.noarch.rpm
yum install --enablerepo="epel" php-mcrypt

Are you trying to install the REPL repository on your droplet? If so, try running the following commands:

wget http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-1.noarch.rpm
rpm -ivh epel-release-7-1.noarch.rpm
yum install --enablerepo="epel" php-mcrypt

Does that work?

wget http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-1.noarch.rpm

sudo yum install epel-release-7-1.noarch.rpm

yum install php-mcrypt*

restart Apache

sudo service httpd restart

Find and edit php.ini. On ubuntu its in /etc/php5/apache2/php.ini

Add this in php.ini

extension=mcrypt.so

Restart apache

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
rpm -ivh epel-release-7-2.noarch.rpm
yum install --enablerepo="epel" php-mcrypt

I managed to get it installed and working using the following commands...

sudo yum install epel-release
sudo yum install libmcrypt-devel

If you are running the default PHP installation you will want to run the following command as well...

sudo yum install php-mcrypt

digging an old thread, below are my results:

Error: Package: php-mcrypt-5.3.3-3.el6.x8664 (epel)
Requires: php(api) = 20090626
Installed: php-common-5.4.16-23.el7
0.3.x8664 (@updates)
php(api) = 20100412-64
Available: php-common-5.4.16-21.el7.x86
64 (base)
php(api) = 20100412-64
Available: php-common-5.4.16-23.el70.x8664 (updates)
php(api) = 20100412-64
Available: php-common-5.4.16-23.el70.1.x8664 (updates)
php(api) = 20100412-64
Error: Package: php-mcrypt-5.3.3-3.el6.x8664 (epel)
Requires: php(zend-abi) = 20090626
Installed: php-common-5.4.16-23.el7
0.3.x8664 (@updates)
php(zend-abi) = 20100525-64
Available: php-common-5.4.16-21.el7.x86
64 (base)
php(zend-abi) = 20100525-64
Available: php-common-5.4.16-23.el70.x8664 (updates)
php(zend-abi) = 20100525-64
Available: php-common-5.4.16-23.el70.1.x8664 (updates)
php(zend-abi) = 20100525-64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest**

am thinking of writing off my whole project because of that, any help will be appreciated

Hi Jadoux
was wondering if you could fix your problem. I'm having the same error message ?
Thx

This might help, It works on me on my centos 7 x64
To install mcrypt just enter this command:
sudo yum install php-mcrypt.x86_64

To search for packages just do this command:
yum search php-

If you find the package that you've been looking for, and want to install it just do this command:
sudo yum install <package name>

[deleted]
  • Installed:
    epel-release.noarch 0:6-8

    Complete!
    root@souldeepvm [~]# yum -y install php-mcrypt
    Loaded plugins: fastestmirror
    Setting up Install Process
    Loading mirror speeds from cached hostfile

    Illegal instruction

    Still not able to install mcrypt

I am getting error .

[root@uploadr mcrypt]# wget http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/e                                                                                    pel-release-7-1.noarch.rpm
--2016-10-10 20:06:05--  http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel                                                                                        -release-7-1.noarch.rpm
Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 209.132.181.26, 209.132                                                                                        .181.23, 209.132.181.24, ...
Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|209.132.181.26|:80...                                                                                         connected.
HTTP request sent, awaiting response... 404 Not Found
2016-10-10 20:06:06 ERROR 404: Not Found.

[root@uploadr mcrypt]#
Have another answer? Share your knowledge.