Как включить mcrypt centos

Обновлено: 29.06.2024

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?

Related

Join 1M+ other developers and:

  • Get help and share knowledge in Q&A
  • Subscribe to topics of interest
  • Get courses & tools that help you grow as a developer or small business owner
When will a CentOS 8 image be available for deployment on DigitalOcean Droplets? Question SSH connection drops too frequently Question

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.

I managed to get this installed on my droplet using the following commands:

If you are running the default PHP installation you will want to run the following command as well.

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.

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

Did you installed the EPEL repository?

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.

Yes did that several times to be sure same result

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

You can try to install it using this command:

sudo yum install libmcrypt-devel

yum install php-mcrypt

Let me know how it goes.

Related

question
When will a CentOS 8 image be available for deployment on DigitalOcean Droplets?
question
SSH connection drops too frequently
question

Hi guys. in my last server, I used virtualizor

question

I have been trying to install php-mcrypt for a while now. Everytime I get the "No package php-mcrypt available." returned to me. Here's what I've tried:

I have made sure to install the EPEL repository. At this point I'm just stumped. I've followed EVERY tutorial I've found online and get the same error.

Notes: Go Daddy VPS, CentOS 6.4 64-bit, mcrypt installed without a hitch, but no php-mcrypt.


29.1k 21 21 gold badges 97 97 silver badges 124 124 bronze badges


791 1 1 gold badge 6 6 silver badges 14 14 bronze badges My past few days was nightmare for me because of Go daddy VPS. Can I contact u, just in case we can share knowledge.. thanks Mcrypt is still heavy used in a lot of third party applications and frameworks. So unless defuse can seamlessly replace mcrypt without having to re-code Its not currently an option. But I will definitely keep that in mind for future reference!

18 Answers 18

I had the same issue, and found the previous suggestions gave me enough info to get it working on my server. The following is what I did:

2) Install it via:

The yum update updated the repository reference on my server then the 2nd command got what I needed :)

3) Restart your webserver. For my apache install I did:


17.4k 25 25 gold badges 79 79 silver badges 148 148 bronze badges same problem when i was trying to install opencart which required mcrypt, that solved it ! As a complete command line novice this worked for me without a hitch - many thanks! You only need the epel repository. The remi repository is not really needed if you only want to install mcrypt.

For me the answer was:

1) Get the Repos from

2) Install it via:

3) Edit the mcrypt.ini

Finally 4) Restart your webserver:

I run this steps in CentOS 6.3 (64) on Azure From Microsoft Linux image

Hope it helps you.

18.6k 8 8 gold badges 46 46 silver badges 93 93 bronze badges it was not necessary, at least for me, to change the extension.

Updated Answer for centos 7

Edit: See comments for updated repositories.

1,452 3 3 gold badges 22 22 silver badges 41 41 bronze badges Just use yum -y install epel-release && yum -y install php-mcrypt

worked for me instead of


7,331 2 2 gold badges 12 12 silver badges 24 24 bronze badges

I was able to figure this out; it was a lot simpler then I thought. Under the WHM manager go to: Home >> Software >> EasyApache (Apache Update) >> There you have two options "Build Profile" or "Customize Based On Profile". I went Customize to keep my current config then followed the instructions on the page.

Eventually there was a place to add and remove php modules. There you will find ever module under the sun. Just select the one you want and rebuild the profile. It was really that simple.


18.9k 16 16 gold badges 80 80 silver badges 165 165 bronze badges


791 1 1 gold badge 6 6 silver badges 14 14 bronze badges it did help me. VOte up for u. But wait. It seems to me, everything have to be install via EasyApache. yum commmand is kinda disabled or something. Can you please share your experience on that @PhamHuyAnh that was a long time ago. From what i can remember i was able to do it all through the cpanel backend like i said above. You should have to run any yum commands. I have managed to survived the pain with Godaddy VPS. Had to use both EasyApache and yum. Thanks Awesome help. I tried with all the commands and also via .rpm package but not worked with anyone but when I tried with EasyApache then it worked like a charm. Great help for this one. :) Neither of the top answers worked for me. This one did.

I got too much problem in installing php-mcrypt using epel-release-6-8.noarch.rpm. It has some dependency problem.

Then I tried in different way.

Then install libmcrypt

The installed php-mcrypt using following command

If php_mcrypt installed on 64bit but reported missing by an installer, check the extension path:

then just use yum command to install the mcrypt package

The best way is to:

Be careful to keep your version updated if you do this.

There are two ways you can address this:


Thanks, Filippos. I was looking for a way to install php-mcrypt without the need to upgrade PHP (5.3.3) and the download from fedora did the trick.

For me I had to add the EPEL repository. It is where my php-mcrypt came from:

2,088 1 1 gold badge 10 10 silver badges 13 13 bronze badges Thank you! It is very helpful. + extension=/usr/lib64/php/modules/mcrypt.so from previous message

I tryed @VenomFangs solution but the first step was not needed for me. I already had a newer EPEL version installed. So, the first step following was not usefull, I backed to the snapshot I did before doing modifications and I just used the install and restart above commands.

CentOS Linux release 7.2.1511 (Core)

PS : I know this is not the subject, but if somebody needs it, the keyword can help. I needed to do this because of this error on prestashop. Two keywords I would be glad to use to find this informations are : "php_mycrypt.dll" "php_mcrypt.dll"
Fatal error: Call to undefined function mcrypt_encrypt() in /classes/Rijndael.php on line 46

EDIT 10/06/2016 :
Another Prestashop solution to try in "Advanced Parameters", "Performance", "Ciphering" (FR : Chiffrement), "Use the custom BlowFish class." instead of "Use Rijndael with mcrypt lib. (you must install the Mcrypt extension)."

Читайте также: