Monday, November 07, 2016

Error when setting up _ installing MCrypt PHP Extension on Redhat 7 Enterprise x64

Error when setting up/installing MCrypt PHP Extension on Redhat 7 Enterprise x64

I knew that mcrypt was not installed when my call to phpmyadmin threw me a warning regarding the mcrypt extension.

Like so:
Cannot load mcrypt extension. Please check your PHP configuration.

So, I got on to setting up mcrypt on my Redhat server in the Google cloud, using yum install php-mcrypt.

I got an error during the installation of mcrypt on my Redhat server in the Google cloud.

Error returned when installing mcrypt:
--> Finished Dependency Resolution
Error: Package: php-mcrypt-5.3.3-1.el6.rf.x86_64 (rpmforge)
Requires: php-api = 20090626
Installed: php-common-5.4.16-42.el7.x86_64 (@rhui-rhel-7-server-rhui-rpms)
php-api = 20100412-64
Available: php-common-5.4.16-21.el7.x86_64 (rhui-rhel-7-server-rhui-rpms)
php-api = 20100412-64
Available: php-common-5.4.16-23.el7_0.x86_64 (rhui-rhel-7-server-rhui-rpms)
php-api = 20100412-64
Available: php-common-5.4.16-23.el7_0.1.x86_64 (rhui-rhel-7-server-rhui-rpms)
php-api = 20100412-64
Available: php-common-5.4.16-23.el7_0.3.x86_64 (rhui-rhel-7-server-rhui-rpms)
php-api = 20100412-64
Available: php-common-5.4.16-36.el7_1.x86_64 (rhui-rhel-7-server-rhui-rpms)
php-api = 20100412-64
Available: php-common-5.4.16-36.1.el7_2.1.x86_64 (rhui-rhel-7-server-rhui-rpms)
php-api = 20100412-64
Available: php-common-5.4.16-36.3.el7_2.x86_64 (rhui-rhel-7-server-rhui-rpms)
php-api = 20100412-64

I searched around for a solution. There were many, but none that matched my error.

I then addressed my problem by using the following commands and solved the error that popped up while installing mcrypt in Redhat 7 Enterpise

$ cd /tmp/
$ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ ls *.rpm
$ sudo yum install epel-release-latest-7.noarch.rpm 
$ sudo yum search php-mcrypt
$ sudo yum info php-mcrypt
$ sudo yum install php-mcrypt
$ sudo systemctl restart httpd

Hope it works for you!

Note: The line in italics is optional.

1 comment:

mapache said...

Hi,

It worked for me!!!

Thank you because you have avoid me a headache :)

Nature, most benign, most benevolent!

We have this habit of blaming nature for all our ills. Obviously, because man is the most intelligent creature on Earth and cannot go wro...

Copyrighted.com Registered & Protected DWYE-NHTO-NBNH-7FFM