apache - 在 Raspbian 上卸载并重新安装 apache2 后无法启动 Apache HTTP 服务器
问题描述
我卸载了 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
但这也不起作用。
解决方案
我在 Pi 上刷了一个新图像,因为我无法让它运行。
推荐阅读
- sql - Number of records created per day
- c# - 用于获取出现次数超过 1 的列表的 LINQ
- cypress - 在 Angular 中单击按钮时,cypress 无法导航到下一页
- python - 带有 x 轴的 pandas matplotlib 边距
- jquery - 如何访问 json 中的嵌套对象并创建 HTML 表
- sql - 在 SQL 中反转 col 和 rows
- javascript - 如何使用css可变颜色和js改变div背景
- search - 使用 grep 获取结果后如何替换文本字符串(批量)
- javascript - 如何在反应js中使用IP获取国家代码和国家名称
- r - 在没有for循环的情况下索引数组中的位置组合