我在使用 Ubuntu 20.04 时遇到问题,我在安装 WINE 后一直在尝试安装 PlayOnLinux。通过命令安装 PlayOnLinux 时,我删除了一些我忘记的依赖项。
我还通过命令删除了 Apachewhereis apache2
并找到了一些目录并删除了那些使用sudo rm -rf <all directory which found before command (whereis apache2)>
之后我尝试运行 apache2 但遇到了问题。在我重新安装 apache2 之后,我删除了 apache2 和 PHP,然后在下面写了同样的问题。
- 第一个命令:
asifulmamun@asifulmamun-ubuntu:~$ service apache2 start
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
- 第二条命令:
asifulmamun@asifulmamun-ubuntu:~$ systemctl status apache2.service
● 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-11-13 16:36:15 +06; 26s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 3522 ExecStart=/usr/sbin/apachectl start (code=exited, status=126)
Nov 13 16:36:15 asifulmamun-ubuntu systemd[1]: Starting The Apache HTTP Server...
Nov 13 16:36:15 asifulmamun-ubuntu apachectl[3535]: /usr/sbin/apachectl: 174: /usr/sbin/apache2: Permission >
Nov 13 16:36:15 asifulmamun-ubuntu apachectl[3522]: Action 'start' failed.
Nov 13 16:36:15 asifulmamun-ubuntu apachectl[3522]: The Apache error log may have more information.
Nov 13 16:36:15 asifulmamun-ubuntu systemd[1]: apache2.service: Control process exited, code=exited, status=>
Nov 13 16:36:15 asifulmamun-ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'.
Nov 13 16:36:15 asifulmamun-ubuntu systemd[1]: Failed to start The Apache HTTP Server.
- 第三条命令:
asifulmamun@asifulmamun-ubuntu:~$ journalctl -xe
-- Support: http://www.ubuntu.com/support
--
-- The unit apache2.service has entered the 'failed' state with result 'exit-code'.
Nov 13 17:46:37 asifulmamun-ubuntu systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: A start job for unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit apache2.service has finished with a failure.
--
-- The job identifier is 2312 and the job result is failed.
Nov 13 17:46:37 asifulmamun-ubuntu sudo[77289]: pam_unix(sudo:session): session closed for user root
Nov 13 17:46:41 asifulmamun-ubuntu wpa_supplicant[876]: wlp2s0: WPA: Group rekeying completed with 7c:8b:ca:7>
Nov 13 17:46:44 asifulmamun-ubuntu wpa_supplicant[876]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT typ>
Nov 13 17:46:57 asifulmamun-ubuntu wpa_supplicant[876]: wlp2s0: CTRL-EVENT-BEACON-LOSS
Nov 13 17:49:31 asifulmamun-ubuntu wpa_supplicant[876]: wlp2s0: CTRL-EVENT-BEACON-LOSS
Nov 13 17:49:38 asifulmamun-ubuntu wpa_supplicant[876]: wlp2s0: CTRL-EVENT-BEACON-LOSS
Nov 13 17:49:41 asifulmamun-ubuntu wpa_supplicant[876]: wlp2s0: CTRL-EVENT-BEACON-LOSS
Nov 13 17:49:46 asifulmamun-ubuntu wpa_supplicant[876]: wlp2s0: CTRL-EVENT-BEACON-LOSS
Nov 13 17:49:49 asifulmamun-ubuntu wpa_supplicant[876]: wlp2s0: CTRL-EVENT-BEACON-LOSS
Nov 13 17:49:51 asifulmamun-ubuntu wpa_supplicant[876]: wlp2s0: CTRL-EVENT-BEACON-LOSS
Nov 13 17:50:10 asifulmamun-ubuntu wpa_supplicant[876]: wlp2s0: CTRL-EVENT-BEACON-LOSS
现在有什么解决办法?
通常不鼓励手动卸载使用包管理器安装的 Apache 等软件。最好的办法是卸载并清除 apache2,然后在需要时重新安装。确保在执行此操作之前备份所有配置文件。
然后可以再次安装。