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:

extension=mcrypt.so

Let me know how it goes.

  • Doesn’t Work

    sudo yum install php-mcrypt

    Last metadata expiration check: 0:23:26 ago on Thu 30 Apr 2020 12:52:33 PM UTC.
    No match for argument: php-mcrypt
    Error: Unable to find a match: php-mcrypt

    Any ideas?

    • Hello, @gotoplus

      Did you installed the EPEL repository?

      sudo yum install epel-release
      

      If the EPEL repository is installed you should be able to install the mcrypt extension without getting the unable to find a match error message.

      Let me know how it goes.

      Regards,
      Alex

      • Yes did that several times to be sure same result

        sudo yum install epel-release

        Last metadata expiration check: 0:02:10 ago on Sun 17 May 2020 02:32:02 AM UTC.
        Package epel-release-8-8.el8.noarch is already installed.
        Dependencies resolved.
        Nothing to do.
        Complete!

        Then

        sudo yum install php-mcrypt

        Last metadata expiration check: 0:00:39 ago on Sun 17 May 2020 02:32:02 AM UTC.
        No match for argument: php-mcrypt
        Error: Unable to find a match: php-mcrypt

Submit an Answer