How to install mcrypt on CentOS 7.6?

Posted October 12, 2019 1.5k views

This php script I am using requires mcrypt but the mcrypt module is depreciated and no longer available.

I tried yum -y install epel-release and yum -y install php-mcrypt but this doesn’t work.

Are there any other ways to install mcrypt?

edited by alexdo

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Hey, @umijs

I managed to get this installed on my droplet 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

Also you will need to find which is your main php.ini file and add or uncomment the following line:

Let me know how it goes.

Submit an Answer