0

When attempting to install apache2 on my machine I get this:

After this operation, 534 kB of additional disk space will be used.
Selecting previously unselected package apache2.
(Reading database ... 249419 files and directories currently installed.)
Preparing to unpack .../apache2_2.4.29-1ubuntu4.5_amd64.deb ...
Unpacking apache2 (2.4.29-1ubuntu4.5) ...
Processing triggers for ufw (0.35-5) ...
Setting up apache2 (2.4.29-1ubuntu4.5) ...
info: Executing deferred 'a2enconf gitweb' for package gitweb
ERROR: Conf gitweb does not exist!
dpkg: error processing package apache2 (--configure):
 installed apache2 package post-installation script subprocess returned error exit status 1
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for gitweb (1:2.17.1-1ubuntu0.4) ...
Package apache2 is not configured yet. Will defer actions by package gitweb.
Processing triggers for systemd (237-3ubuntu10.13) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Errors were encountered while processing:
 apache2
E: Sub-process /usr/bin/dpkg returned an error code (1)

Anyone know the issue? I have also tried:

/etc/init.d/apache2 stop
sudo apt-get purge apache2*
sudo dpkg --configure -a
sudo apt-get install -f
sudo apt install apache2

but it logs almost the same issue:

<...>
Enabling site 000-default.
info: Executing deferred 'a2enconf gitweb' for package gitweb
ERROR: Conf gitweb does not exist!
dpkg: error processing package apache2 (--configure):
 installed apache2 package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (237-3ubuntu10.13) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for ufw (0.35-5) ...
Errors were encountered while processing:
 apache2
E: Sub-process /usr/bin/dpkg returned an error code (1)
2

From comments:

Purge gitweb and apache2 and reinstall apache2.

sudo apt-get purge apache2 && sudo apt-get purge gitweb && sudo apt-get install apache2

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.