sudo apt-get install php-pear php7.x-dev x is your php version like 7.2 the php7.2-dev sudo apt-get install libmcrypt-dev libreadline-dev sudo pecl install mcrypt-1.0.1
sudo apt-get install php-pear php7.x-dev x is your php version like 7.2 the php7.2-dev sudo apt-get install libmcrypt-dev libreadline-dev sudo pecl install mcrypt-1.0.1