Everytime when I try to install php using this command, it shows me "E: Package 'php5-mcrypt' has no installation candidate".

Here is the command below what I used for installing php-

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

I'm going to guess that you are using an old version of Ubuntu that is no longer supported or you are following a tutorial that is outdated. Php and by extension php-mcrypt are now at version 7.

sudo apt-get install ... php7.0-mcrypt   
  • I have just tried your command and now it is showing me "E: Unable to correct problems, you have held broken package ." . What does that mean? – Bangladesh 71 Mar 11 '17 at 13:20

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.