sudo apt-get install php5-cli
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5-cli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
php7.0-cli:i386 php7.0-cli
E: Package 'php5-cli' has no installation candidate
Asked
Active
Viewed 1.3k times
6

Mark Kirby
- 18,529
- 19
- 78
- 114

niko craft
- 161
-
Which ubuntu version are u using? – Mohit Rajan Apr 30 '16 at 15:17
-
1I am assuming you're using Ubuntu 16.04, if that's correct, why not use php7.0-cli instead? – Apr 30 '16 at 15:29
-
yes I am using Ubuntu 16.04 is php5-cli not avialable for it? – niko craft Apr 30 '16 at 17:43
1 Answers
9
Ubuntu 16.04 comes with PHP 7.0 packaged with php7.0- prefix. PHP CLI SAPI is packaged in php7.0-cli package and provides /usr/bin/php
command symlinked to /usr/bin/php7.0
binary using update-alternatives
mechanism to provide best available PHP version.
If you need PHP 5.6 or PHP 5.5 CLI you need to use ppa:ondrej/php
and install either php5.6-cli
or php5.5-cli
package. You can access the CLI binaries either by using /usr/bin/php5.6
or /usr/bin/php5.5
or update the default /usr/bin/php
symlink with update-alternatives
command.

oerdnj
- 7,940