无法在 RaspberryPi 4 上启动 Apache2 服务器

时间:2021-06-07 18:15:35

标签: apache2

我在 Raspberry Pi4 B 上安装了 Apache2,但它没有启动。如果有人遇到同样的问题,请告诉我解决方案。

Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2021-06-07 21:07:32 EEST; 22ms ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 30140 ExecStart=/usr/sbin/apachectl start (code=exited, status=127)

Jun 07 21:07:32 raspberrypi systemd[1]: Starting The Apache HTTP Server...
Jun 07 21:07:32 raspberrypi apachectl[30140]: /usr/sbin/apachectl: 174: /usr/sbin/apachectl: /usr/sbin/apache2: not found
Jun 07 21:07:32 raspberrypi apachectl[30140]: Action 'start' failed.
Jun 07 21:07:32 raspberrypi apachectl[30140]: The Apache error log may have more information.
Jun 07 21:07:32 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited, status=127/n/a
Jun 07 21:07:32 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 07 21:07:32 raspberrypi systemd[1]: Failed to start The Apache HTTP Server.
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for systemd (241-7~deb10u4+rpi1) ...

1 个答案:

答案 0 :(得分:0)

问题解决: sudo apt install --reinstall apache2-bin
须藤服务 apache2 启动