本文操作环境:ubuntu16.04系统、php5版,dell g3电脑
在ubuntu16.04下无法安装php5问题解决
由于之前的项目是用php5写的,想要部署在升级到ubuntu16.04的系统上就要安装php5版本,运行下列命令后发现如下提示:
lhs@taing:/var/www/html$ sudo apt-get install php5reading package lists... donebuilding dependency tree reading state information... donepackage php5 is not available, but is referred to by another package.this may mean that the package is missing, has been obsoleted, oris only available from another sourcee: package 'php5' has no installation candidatelhs@taing:/var/www/html$ sudo apt-get install libapache2-mod-php5reading package lists... donebuilding dependency tree... 50%building dependency tree reading state information... donepackage libapache2-mod-php5 is not available, but is referred to by another package.this may mean that the package is missing, has been obsoleted, oris only available from another sourcee: package 'libapache2-mod-php5' has no installation candidate
造成这种错误提示的原因是16.04官方软件库中没有php5,只自带php7。想要安装php5的话,需要安装14.04或者使用ppa。
【推荐学习:php视频教程】
以上就是ubuntu 安装不了php5怎么办的详细内容。
