Ubuntu Apache:“模块php7不存在" [英] Ubuntu Apache: "Module php7 does not exist"

查看:442
本文介绍了Ubuntu Apache:“模块php7不存在"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在DigitalOcean Ubuntu 14.04计算机上将PHP 5.5.9升级到PHP 7.

I am trying to upgrade PHP 5.5.9 to PHP 7 on my DigitalOcean Ubuntu 14.04 machine.

我已经阅读了很多教程和文章,但是他们每个都错过了一些东西.例如,在某处他们说您必须先sudo a2dismod php5然后sudo a2enmod php7.问题是我总是收到此消息

I've read many tutorials and articles how to do it, but each of them misses something. For example, somewhere they say you must sudo a2dismod php5 then sudo a2enmod php7. The problem is that I always get this message

$ sudo a2enmod php7
ERROR: Module php7 does not exist!

请问有人可以解决这个问题吗?

Does someone one how to resolve this problem, please?

谢谢.

推荐答案

最后,由于Ed de Almeida的评论,我找到了解决方案.

Finally, thanks to the comment of Ed de Almeida, I found the solution.

我必须安装其他软件包:

I had to install an additional package:

$ sudo apt-get install libapache2-mod-php7.0

现在我可以运行sudo a2enmod php7.0.

这篇关于Ubuntu Apache:“模块php7不存在"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆