View Full Version : [ubuntu] installing mcrypt for php7 ubuntu 16.04

October 21st, 2016, 04:26 PM
my server is digitalocean ubuntu 16.04 LAMP php7
need to install mcrypt but always failed
i tried

sudo apt-get update
sudo apt-get install mcrypt
add the mcrypt.ini file on the folder
sudo phpenmod mcrypt
sudo service apache2 restart

also being desperate tried anything on google like

sudo apt-get install php5-mcrypt
sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
sudo php5enmod mcrypt
sudo service apache2 restart

but failed from the first line saying
E: Package 'php5-mcrypt' has no installation candidate

why is this happening?
digitalocean support still hasn't reply for 6H+

October 21st, 2016, 07:05 PM
According to https://launchpad.net/ubuntu/+source/php7.0, the package for mcrypt is called php7.0-mcrypt. Did you try that?