
Acabei de atualizar o Ubuntu e agora o Apache2 não inicia.
sudo systemctl status apache2.service
apachectl[2174]: apache2: Syntax error on line 144 of /etc/apache2/apache2.conf:
Syntax error on line 2 of /etc/apache2/mods-enabled/php7.0.load:
Cannot load /usr/lib/apache2/modules/libphp7.0.so intoserver:
/usr/lib/apache2/modules/libphp7.0.so: cannot open shared object file: No such file or directory
Parece que houve um erro ao tentar carregar o módulo php7.0, mas o php7.0 está instalado.
php -v
PHP 7.2.7-0ubuntu0.18.04.2 (cli) (built: Jul 4 2018 16:55:24) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.7-0ubuntu0.18.04.2, Copyright (c) 1999-2018, by Zend
Technologies
apache2 -v
Server version: Apache/2.4.29 (Ubuntu)
Server built: 2018-06-07T21:10:10
O que eu preciso fazer?
Quando atualizei o Ubuntu, ele disse que havia muitos módulos que agora estão obsoletos.
Responder1
Parece que isso resolveu:
sudo a2dismod php7.0
sudo a2enmod php7.2
sudo systemctl reiniciar apache2
Acho que estava tentando usar a versão errada do PHP