use*_*961 4 package-management apt apache2
如果我输入:
sudo apt-get install apache2
Run Code Online (Sandbox Code Playgroud)
我得到:
Setting up apache2-bin (2.4.7-1ubuntu4.8) ...
Setting up apache2-data (2.4.7-1ubuntu4.8) ...
Setting up apache2 (2.4.7-1ubuntu4.8) ...
ERROR: Config file dir.conf not properly enabled: /etc/apache2/mods-enabled/dir.conf is a real file, not touching it
dpkg: error processing package apache2 (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Errors were encountered while processing:
apache2
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
输入:sudo apt-get install -f
输出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up apache2 (2.4.7-1ubuntu4.8) ...
ERROR: Config file dir.conf not properly enabled: /etc/apache2/mods-enabled/dir.conf is a real file, not touching it
dpkg: error processing package apache2 (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
apache2
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
如果您没有任何需要的 apache2 配置,请尝试通过删除所有 apache2 文件和配置并安装新的默认配置来解决此问题。
尝试以下命令来卸载并删除配置文件。
(卸载前需要停止apache服务):
sudo apt-get purge apache2*
Run Code Online (Sandbox Code Playgroud)
并通过键入以下内容再次安装它:
apt-get install apache2
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13441 次 |
| 最近记录: |