apache2 未正确安装且无法在 ubuntu 20.04 中启动

apache2 未正确安装且无法在 ubuntu 20.04 中启动

当我安装 apache2 时出现以下错误。

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 Fri 2020-12-18 18:09:15 IST; 9ms ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 43699 ExecStart=/usr/sbin/apachectl start (code=exited, status=127)

Dec 18 18:09:15 rushikesh systemd[1]: Starting The Apache HTTP Server...
Dec 18 18:09:15 rushikesh apachectl[43721]: /usr/sbin/apachectl: 174: /usr/sbin/apache2: not found
Dec 18 18:09:15 rushikesh apachectl[43699]: Action 'start' failed.
Dec 18 18:09:15 rushikesh apachectl[43699]: The Apache error log may have more information.
Dec 18 18:09:15 rushikesh systemd[1]: apache2.service: Control process exited, code=exited, status=127/n/a
Dec 18 18:09:15 rushikesh systemd[1]: apache2.service: Failed with result 'exit-code'.
Dec 18 18:09:15 rushikesh systemd[1]: Failed to start The Apache HTTP Server.

root@rushikesh:/# systemctl status apache2

apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2020-12-18 18:15:47 IST; 1min 46s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 45201 ExecStart=/usr/sbin/apachectl start (code=exited, status=127)

Dec 18 18:15:47 rushikesh systemd[1]: Starting The Apache HTTP Server...
Dec 18 18:15:47 rushikesh apachectl[45215]: /usr/sbin/apachectl: 174: /usr/sbin/apache2: not found
Dec 18 18:15:47 rushikesh apachectl[45201]: Action 'start' failed.
Dec 18 18:15:47 rushikesh apachectl[45201]: The Apache error log may have more information.
Dec 18 18:15:47 rushikesh systemd[1]: apache2.service: Control process exited, code=exited, status=127/n/a
Dec 18 18:15:47 rushikesh systemd[1]: apache2.service: Failed with result 'exit-code'.
Dec 18 18:15:47 rushikesh systemd[1]: Failed to start The Apache HTTP Server.

我尝试了所有方法来解决这个问题,但还是没有解决。

知道可能出现什么问题以及如何解决这个问题吗?

相关内容