Erro ao reinstalar o apache2 E: O subprocesso / usr / bin / dpkg retornou um código de erro (1)

1

Eu tinha reinstalado o apache2 porque meus sites eram todos de cache e agora, quando tento instalá-lo, recebo:

root@vps139242:~# sudo apt-get install apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
apache2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 48 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up apache2 (2.4.7-1ubuntu4.18) ...
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)

Eu tentei limpá-lo e autoremove, mas ainda nada eu não sei o que fazer qualquer ajuda é apreciada.

    
por Rhys19 23.11.2017 / 22:53

1 resposta

1

Se você realmente deseja redefinir sua configuração do apache2, siga estas etapas.

# Rename your Apache2 configuration folder (just in case of).
sudo mv /etc/apache2 /etc/apache2.old

# Look up for all Apache2 package installed
dpkg -l | grep apache2

# Remove all Apache packages, usualy the following
apt remove --purge apache2 apache2-data apache2-bin

# Finally reinstall your Apache2 server
apt install apache2
    
por olivierb2 23.11.2017 / 23:04