
Acabo de actualizar Ubuntu y ahora Apache2 no se inicia.
sudo systemctl estado 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 hay un error al intentar cargar el módulo php7.0, pero 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
¿Que necesito hacer?
Cuando actualicé Ubuntu, decía que había muchos módulos que ahora están obsoletos.
Respuesta1
Parece que esto lo resolvió:
sudo a2dismod php7.0
sudo a2enmod php7.2
sudo systemctl reiniciar apache2
Supongo que estaba intentando usar la versión PHP incorrecta.