
Instalé una lámpara en mi 15.10. Estaba funcionando. Ayer actualicé mi computadora ubuntu 15.10 a 16.04. Intenté acceder a localhost sin éxito.
Lo intenté service apache2 restart
y recibí el siguiente error:
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Sun 2017-06-25 13:50:20 IST; 1min 0s ago
Docs: man:systemd-sysv-generator(8)
Process: 5414 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jun 25 13:50:20 ajay-Lenovo-G50-70 apache2[5414]: *
Jun 25 13:50:20 ajay-Lenovo-G50-70 apache2[5414]: * The apache2 configtest failed.
Jun 25 13:50:20 ajay-Lenovo-G50-70 apache2[5414]: Output of config test was:
Jun 25 13:50:20 ajay-Lenovo-G50-70 apache2[5414]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory
Jun 25 13:50:20 ajay-Lenovo-G50-70 apache2[5414]: Action 'configtest' failed.
Jun 25 13:50:20 ajay-Lenovo-G50-70 apache2[5414]: The Apache error log may have more information.
Jun 25 13:50:20 ajay-Lenovo-G50-70 systemd[1]: apache2.service: Control process exited, code=exited status=1
Jun 25 13:50:20 ajay-Lenovo-G50-70 systemd[1]: Failed to start LSB: Apache2 web server.
Jun 25 13:50:20 ajay-Lenovo-G50-70 systemd[1]: apache2.service: Unit entered failed state.
Jun 25 13:50:20 ajay-Lenovo-G50-70 systemd[1]: apache2.service: Failed with result 'exit-code'.
Respuesta1
¡Lo tengo chicos! ¡No hay problema!
Llegué a comprender que 16.04 viene con PHP 7.0 en lugar de 5.0. Supongo que tenía módulos de PHP 5.0 instalados para Apache.
Instalación del módulo Apache php7.0:
sudo apt-get install libapache2-mod-php7.0
Deshabilitando el módulo php5, ya que no tenemos php5.0:
sudo a2dismod php5
Módulo php7 habilitado:
sudo a2enmod php7.0
Apache reiniciado:
sudo service apache2 restart
eso es todo amigos