AWs has given me the following response:
Thank you for contacting AWS Support. My name is Luke and
I will assist you today.
I understand you would like to install mcrypt on php7.2
on Amazon Linux 2.
The installation of mcrypt is out of the scope of our
support, however I will help you on a best effort basis. I've taken the liberty
to do a bit of extra research on this topic and the following information is
provided to your on a best effort basis.
Let me first state that mcrypt is no longer supported (https://wiki.php.net/rfc/mcrypt-viking-funeral)
by PHP7.2 . I recommend to get in touch with the people who made your program
to see if you can use an earlier version of php with mcrypt or if they have an
alternative way to install mcrypt on php7.2.
From my investigation the best way to get php and mcrypt
install is to install php 5.4 and mcrypt 5.4 using unsupported EPEL packages
from RHEL 7. Please note the following instructions should be tested in a lab
environment before being deployed to a production environment. I've detailed
instructions below:
1. Install and
enable the EPEL rpm package on RHEL 7 and Amazon Linux 2:
$sudo yum install –y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
2. install
php-mycrypt
$sudo yum install php-mcrypt
Installing:
php-mcrypt x86_64 5.4.16-7.el7 epel 20 k
Installing for dependencies:
libmcrypt x86_64 2.5.8-13.el7 epel 99 k
libzip010-compat x86_64 0.10.1-9.amzn2.0.4 amzn2-core 30 k
php-common x86_64 5.4.16-45.amzn2.0.5 amzn2-core 566 k
3. install php
$sudo yum install php
Installed:
php.x86_64
0:5.4.16-45.amzn2.0.5
4. epel repo can
now be disabled
$ sudo yum-config-manager --disable epel
Alternatively this might be out of scope of your query so
I've provided some additional instructions if you need to know how to install
php7.2 on Amazon Linux 2 :
1. Enable PHP7.2 in amazon-linux-extras:
$ sudo amazon-linux-extras enable php7.2
2. Install php7.2
$sudo yum install php
4.Verify the version of PHP that's available:
$ sudo yum info php
Version : 7.2.5