Ubuntu Apache: “Module php7 does not exist” [close

2020-05-24 20:11发布

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

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?

Thanks in advance.

1条回答
做自己的国王
2楼-- · 2020-05-24 20:47

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

Now I could run sudo a2enmod php7.0.

查看更多
登录 后发表回答