【问题标题】:Failed to start The Apache HTTP Server after uninstalling and reinstalling apache2 on Raspbian在 Raspbian 上卸载并重新安装 apache2 后无法启动 Apache HTTP 服务器
【发布时间】:2021-10-28 01:53:04
【问题描述】:

我卸载了 apache、php、mysql、proftpd、wordpress、cerbot 和letsencrypt 以获得全新的apache 安装。

卸载所有软件包并重新安装 apache 后,出现此错误:

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 "restart" failed.
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2021-08-28 15:46:46 CEST; 23ms ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 10693 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Aug 28 15:46:46 raspberrypi systemd[1]: Starting The Apache HTTP Server...
Aug 28 15:46:46 raspberrypi apachectl[10693]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 33 of /etc/apache2/sites-enabled/000-default-le-ssl.conf: Could not open configuration file /etc/letsencrypt/options-ssl-apache.conf: No such file or directory
Aug 28 15:46:46 raspberrypi apachectl[10693]: Action 'start' failed.
Aug 28 15:46:46 raspberrypi apachectl[10693]: The Apache error log may have more information.
Aug 28 15:46:46 raspberrypi systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Aug 28 15:46:46 raspberrypi systemd[1]: apache2.service: Failed with result 'exit-code'.
Aug 28 15:46:46 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~deb10u8+rpi1) ...

我试图删除所有与 apache 相关的包

sudo apt-get remove apache2
sudo apt autoremove

但这也没有用。

【问题讨论】:

    标签: apache raspberry-pi apache2


    【解决方案1】:

    您在文件 /etc/apache2/apache2.conf 的第 225 行输入错误

    【讨论】:

    • 我删除了目录 /etc/apache2,因为我希望在再次安装 apache 时这能解决我的问题。但是现在说:Could not open configuration file /etc/apache2/apache2.conf: No such file or directory安装apache的时候不应该创建目录吗?
    【解决方案2】:

    我在 Pi 上刷了一个新图像,因为我无法让它运行。

    【讨论】:

    • 请在您的回答中提供更多详细信息。正如目前所写的那样,很难理解您的解决方案。
    猜你喜欢
    • 2018-11-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-14
    • 2020-10-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-12
    相关资源
    最近更新 更多