apache2 安装后,apache 无法工作:
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; disabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2019-09-24 07:44:35 CEST; 30min ago
de set. 24 07:44:35 dai-Aspire-M7811 systemd[1]: Starting The Apache HTTP Server...
de set. 24 07:44:35 dai-Aspire-M7811 apachectl[14153]: /usr/sbin /apachectl: 174: /usr/sbin/apachectl: /usr/sbin/apache2: not found
de set. 24 07:44:35 dai-Aspire-M7811 apachectl[14153]: Action 'start' failed.
de set. 24 07:44:35 dai-Aspire-M7811 apachectl[14153]: The Apache error log may have more information.
de set. 24 07:44:35 dai-Aspire-M7811 systemd[1]: apache2.service: Control process exited, code=exited status=127
de set. 24 07:44:35 dai-Aspire-M7811 systemd[1]: apache2.service: Failed with result 'exit-code'.
de set. 24 07:44:35 dai-Aspire-M7811 systemd[1]: Failed to start The Apache HTTP Server.
你能帮助我吗?谢谢
PD:我删除了 apache2 并重新安装它,但它给了我一个错误代码:
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
我尝试了这个并且效果很好:
sudo apt-get --purge remove apache2*
sudo apt-get --purge autoremove
sudo apt-get install apache2
谢谢 pa4080!