Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yum install mcrypt on AWS linux (centos)

Tags:

php

I cant seem to install mcrypt on my new linux box with PHP 5.4
I have tried sudo yum install php-mcrypt, sudo yum install php-mcrypt.x86_64

result:

Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.x86_64 0:5.3.28-1.5.amzn1 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.28-1.5.amzn1 for package: php-mcrypt-5.3.28-1.5.amzn1.x86_64
--> Processing Dependency: libmcrypt.so.4()(64bit) for package: php-mcrypt-5.3.28-1.5.amzn1.x86_64
--> Processing Dependency: libltdl.so.7()(64bit) for package: php-mcrypt-5.3.28-1.5.amzn1.x86_64
--> Running transaction check
---> Package libmcrypt.x86_64 0:2.5.8-9.1.2.amzn1 will be installed
---> Package libtool-ltdl.x86_64 0:2.4.2-18.4.8.2.21.amzn1 will be installed
---> Package php-common.x86_64 0:5.3.28-1.5.amzn1 will be installed
--> Processing Conflict: php54-common-5.4.30-1.56.amzn1.x86_64 conflicts php-common < 5.4.30-1.56.amzn1
--> Finished Dependency Resolution
Error: php54-common conflicts with php-common-5.3.28-1.5.amzn1.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

inside php.ini i've added mcrypt.so, but this didnt do anything
so then i took that off and created /etc/php.d/mcrypt.ini and added extension=mcrypt.so

Any help please
thank you

like image 220
t q Avatar asked Jul 30 '14 00:07

t q


People also ask

How do I know if Mcrypt is installed?

Determine if the mcrypt extension is loaded in any of the following ways: Set up a phpinfo. php file in the web server's root directory and examine the output in a web browser. Run the following command: $ php -r "phpinfo();" | grep mcrypt.

What is PHP-Mcrypt package?

What is mcrypt? The mcrypt extension is a replacement for the UNIX crypt command. These commands serve as a means to encrypt files on UNIX and Linux systems. The php-mcrypt extension serves as an interface between PHP and mcrypt.


2 Answers

you can use:

sudo yum install php56-mcrypt
sudo service httpd restart
like image 138
Hung Mac Avatar answered Sep 22 '22 02:09

Hung Mac


Chances are the package is named php54-mcrypt instead of php-mcrypt if you have existing packages named like php54-common.

like image 30
ceejayoz Avatar answered Sep 21 '22 02:09

ceejayoz