
Estou tentando configurar meu Raspberry Pi para ser um servidor web. Acabei de instalá-lo hoje, então está na configuração mais recente. Eu fui com o apache2. Eu li que se inserir o endereço IP do meu computador no Chrome não abrir a página de exemplo, devo usar o comando linux
sudo service apache2 start
No entanto, quando tento executar o código, recebo a seguinte mensagem:
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
Em seguida, abro o primeiro arquivo que ele me pede para verificar e é isso que aparece:
Jun 01 18:59:27 raspberrypi systemd[1]: Starting The Apache HTTP Server...
Jun 01 18:59:27 raspberrypi apachectl[6989]: /usr/sbin/apachectl: 174: /usr/sbin/apachectl: /usr/sbin/apachectl: /usr/sbin/apache2: not found
Jun 01 18:59:27 raspberrypi apachectl[6989]: Action 'start' failed.
Jun 01 18:59:27 raspberrypi apachectl[6989]: The Apache error log may have more information.
Jun 01 18:59:27 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited status=127
Jun 01 18:59:27 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.
Jun 01 18:59:27 raspberrypi systemd[1]: apache2.service: Unit entered failed state.
Jun 01 18:59:27 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.
Não tenho certeza se instalei os arquivos do Apache corretamente.
Responder1
/usr/sbin/apache2: not found
Obviamente o arquivo não existe. Normalmente seria de se esperar que a distribuição fornecesse arquivos unitários adequados. Talvez você não tenha instalado o Apache da maneira que deveria ser feito? Você pode verificar os arquivos instalados ( dpkg-query --listfiles apache2
) e criar um arquivo de unidade correto.