0

I am trying to install apache2-bin because I can't restart apache2 do to a missing or broke config. And my website is down or won't redirect properly without apache2 running. So what I have is this error occurring when I try to install:

The following NEW packages will be installed:
apache2-bin
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
Need to get 0 B/1067 kB of archives.
After this operation, 3979 kB of additional disk space will be used.
(Reading database ... 106699 files and directories currently installed.)
Preparing to unpack .../apache2-bin_2.4.23-1+deb.sury.org~trusty+1_amd64.deb ...
Unpacking apache2-bin (2.4.23-1+deb.sury.org~trusty+1) ...
dpkg: error processing archive /var/cache/apt/archives/apache2-bin_2.4.23-1+deb.sury.org~trusty+1_amd64.deb (--unpack):
trying to overwrite '/usr/sbin/apache2', which is also in package apache2-mpm-worker 2.2.22-1ubuntu1.11
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/apache2-bin_2.4.23-1+deb.sury.org~trusty+1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)***

1 Answers1

0

This issue was resolved using the following response:

how reinstall apache2?

First:

sudo apt-get --purge remove apache2
sudo apt-get autoremove

Then installing apache2 is as simple as:

sudo apt-get install apache2
sudo /etc/init.d/apache2 restart

To test it:

lynx "http://localhost"