I'm unable to install PHP5 in Ubuntu 16.04

Ubuntu 16.04 LTS comes with PHP 7.0. To install it, you need to run:

sudo apt-get install php

Or rather pick a specific PHP Web SAPI, most probably you need support for Apache2:

sudo apt-get install libapache2-mod-php php

Or PHP FPM

sudo apt-get install php-fpm php

If you specifically need PHP 5.x, you'll need to use ppa:ondrej/php and install, f.e. PHP 5.6 for Apache2:

sudo apt-get install php5.6 libapache2-mod-php5.6

Tags:

Php

16.04