-2

This question already has an answer here:

I tried to install php5.

However, I got an error saying

Package has no installation candidate

What should I do?

marked as duplicate by Pilot6, karel, Charles Green, Zanna, Yaron Sep 19 '17 at 7:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Please post the commands used and the errors seen! Give us 1) ubuntu version 2) commands ran. And of cause you can check is that version is available with apt-cache search php5 – George Udosen Sep 18 '17 at 10:30
1

It depends on your Ubuntu version. If you have Ubuntu 16.04 then you should install php7.0 instead of php5.

sudo apt-get install php7.0

It should work properly.

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