无法在ubuntu中安装php5如何解决

本篇文章为大家展示了无法在ubuntu中安装php5如何解决,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。

ubuntu安装不了php5是因为ubuntu16.04官方软件库中没有php5,只自带php7,其解决办法就是安装14.04或者使用PPA即可。

在ubuntu16.04下无法安装php5问题解决

由于之前的项目是用php5写的,想要部署在升级到ubuntu16.04的系统上就要安装php5版本,运行下列命令后发现如下提示:

lhs@taing:/var/www/html$ sudo apt-get install php5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php5 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
E: Package 'php5' has no installation candidate
lhs@taing:/var/www/html$ sudo apt-get install libapache2-mod-php5
Reading package lists... Done
Building dependency tree... 50%
Building dependency tree       
Reading state information... Done
Package libapache2-mod-php5 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
E: Package 'libapache2-mod-php5' has no installation candidate

上述内容就是无法在ubuntu中安装php5如何解决,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注行业资讯频道。