How to install MCrypt PHP Extension on CentOS 7.0 x64

September 18, 2014 130.2k 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
    
13 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]#

[root@server src]# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
--2019-01-11 14:04:05-- http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 209.132.181.24, 209.132.181.23
Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|209.132.181.24|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-01-11 14:04:05 ERROR 404: Not Found.

[root@server src]# rpm -ivh epel-release-7-2.noarch.rpm
error: open of epel-release-7-2.noarch.rpm failed: No such file or directory
[root@server src]# yum install --enablerepo="epel" php-mcrypt
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.checkdomain.de
  • epel: ftp.plusline.net
  • extras: mirror.checkdomain.de
  • updates: mirror.fra10.de.leaseweb.net No package php-mcrypt available. Error: Nothing to do

I can't install =(. please help me... =( =( =(

PHP 7.2.14 > Directadmin > Centos 7.6.1810

[root@server ~]# wget http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-1.noarch.rpm
--2019-01-20 01:56:31--  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.23, 209.132.181.24
Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|209.132.181.23|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-01-20 01:56:31 ERROR 404: Not Found.

[root@server ~]# rpm -ivh epel-release-7-1.noarch.rpm
error: open of epel-release-7-1.noarch.rpm failed: No such file or directory
[root@server ~]# yum install --enablerepo="epel" php-mcrypt
Loaded plugins: changelog, fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: mirror.checkdomain.de
 * epel: mirror.wiuwiu.de
 * extras: mirror.ratiokontakt.de
 * updates: mirror.wiuwiu.de
No package php-mcrypt available.
Error: Nothing to do
[root@server ~]# sudo yum install epel-release-7-1.noarch.rpm
Loaded plugins: changelog, fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: mirror.checkdomain.de
 * epel: mirror.wiuwiu.de
 * extras: mirror.ratiokontakt.de
 * updates: mirror.wiuwiu.de
No package epel-release-7-1.noarch.rpm available.
Error: Nothing to do
[root@server ~]# yum install epel-release-7-1.noarch.rpm
Loaded plugins: changelog, fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: mirror.checkdomain.de
 * epel: mirror.wiuwiu.de
 * extras: mirror.ratiokontakt.de
 * updates: mirror.wiuwiu.de
No package epel-release-7-1.noarch.rpm available.
Error: Nothing to do
[root@server ~]# yum install php-mcrypt*
Loaded plugins: changelog, fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: mirror.checkdomain.de
 * epel: mirror.wiuwiu.de
 * extras: mirror.ratiokontakt.de
 * updates: mirror.wiuwiu.de
No package php-mcrypt* available.
Error: Nothing to do
[root@server ~]#
[root@server ~]# restart Apache
-bash: restart: command not found
[root@server ~]#
[root@server ~]# sudo service httpd restart
Redirecting to /bin/systemctl restart httpd.service

Have another answer? Share your knowledge.