ubuntu安装不了PHP5,ubuntu 安装不了php5怎么办

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

2b9af2f98a46a2472303f05661211bd5.png

本文操作环境:ubuntu16.04系统、PHP5版,DELL G3电脑

在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

造成这种错误提示的原因是16.04官方软件库中没有php5,只自带php7。想要安装php5的话,需要安装14.04或者使用PPA。

【推荐学习:PHP视频教程】

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值