Following LAMP tutorial - Php5 "has no potential candidate"

Posted August 20, 2016 32.6k views
PHPLAMP StackUbuntu 16.04

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt is the command, E: package “php5” has no installation candidate is the response, same for libapache2-mod and the other one.

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.

Submit an Answer
3 answers

I think that 16.04 uses php 7 by default, but you can just use php and it will choose the latest:

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

yes, it worked for me also. Thanks

yes it worked for me also (16.0)