ubuntu - Apache2 服务无法在 Ubuntu 15.10 中启动

标签 ubuntu apache2 ubuntu-15.10

我已经安装了 apache2,但是当我安装时它不会启动

sudo 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.

所以当我输入这个命令时

 systemctl status apache2.service

它给我这条消息

● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: failed (Result: exit-code) since ن 2016-04-11 15:41:07 WEST; min  43s ago
 Docs: man:systemd-sysv-generator(8)
Process: 19644 ExecStart=/etc/init.d/apache2 start (code=exited, status=2)

11 15:41:07 oussama-UL50VT systemd[1]: Starting LSB: Apache2 web server...
11 15:41:07 oussama-UL50VT apache2[19644]: /etc/init.d/apache2: 64: .: Can't open /etc/apache2/envvars
11 15:41:07 oussama-UL50VT apache2[19644]: /etc/init.d/apache2: 76: .: Can't open /etc/apache2/envvars
11 15:41:07 oussama-UL50VT systemd[1]: apache2.service: Control process exited, code=exited status=2
11 15:41:07 oussama-UL50VT systemd[1]: Failed to start LSB: Apache2 web server.
11 15:41:07 oussama-UL50VT systemd[1]: apache2.service: Unit entered failed state.
11 15:41:07 oussama-UL50VT systemd[1]: apache2.service: Failed with result 'exit-code'.
11 15:41:07 oussama-UL50VT apache2[19644]: ERROR: APACHE_PID_FILE needs to be defined in /etc/apache2/envvars

最佳答案

看来您的 apache 安装已损坏...请尝试通过在终端中运行以下命令来重新安装 apache:

sudo apt-get purge apache2
sudo apt-get install apache2

关于ubuntu - Apache2 服务无法在 Ubuntu 15.10 中启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36552129/

相关文章:

perl - 在 Ubuntu 中执行一个 .cgi 文件

apache2 - HTTP/1.1 200 好

linux - 无法打开虚拟机: The virtual machine appears to be in use

linux - 系统重启后 systemctl 服务未启动

ubuntu - ubuntu终端新目录中的链接数量问题

ubuntu - WebStorm 和 WSL : Failed to prepare environment: Trying to get WSL path from a different WSL distribution

apache - 如何杀死 apache(老一代)进程

linux - 服务 docker 启动不起作用(守护进程),ubuntu-15.10,使用 intelliJ 运行 dockerfile

ubuntu - 系统重启后 Docker 不显示任何容器或图像

java - 编辑列出的 hudson java 系统信息