I am having trouble installing apache2.
This is my output when I try to install it:
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
apache2-data apache2-utils
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed:
apache2 apache2-data apache2-utils
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/339 kB of archives.
After this operation, 1819 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 196569 files and directories currently installed.)
Preparing to unpack .../apache2-data_2.4.41-4ubuntu3.8_all.deb ...
Unpacking apache2-data (2.4.41-4ubuntu3.8) ...
dpkg: error processing archive /var/cache/apt/archives/apache2-data_2.4.41-4ubuntu3.8_all.deb (--unpack):
trying to overwrite '/usr/share/apache2/error/HTTP_BAD_GATEWAY.html.var', which is also in package ea-apache24 2.4.51-1+2.1.cpanel
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../apache2-utils_2.4.41-4ubuntu3.8_amd64.deb ...
Unpacking apache2-utils (2.4.41-4ubuntu3.8) ...
dpkg: error processing archive /var/cache/apt/archives/apache2-utils_2.4.41-4ubuntu3.8_amd64.deb (--unpack):
trying to overwrite '/usr/bin/ab', which is also in package ea-apache24-tools 2.4.51-1+2.1.cpanel
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../apache2_2.4.41-4ubuntu3.8_amd64.deb ...
Unpacking apache2 (2.4.41-4ubuntu3.8) ...
dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.41-4ubuntu3.8_amd64.deb (--unpack):
trying to overwrite '/usr/sbin/apachectl', which is also in package ea-apache24 2.4.51-1+2.1.cpanel
Errors were encountered while processing:
/var/cache/apt/archives/apache2-data_2.4.41-4ubuntu3.8_all.deb
/var/cache/apt/archives/apache2-utils_2.4.41-4ubuntu3.8_amd64.deb
/var/cache/apt/archives/apache2_2.4.41-4ubuntu3.8_amd64.deb
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)```
I tried deleting those files in the /var/cache/apt/archives/ but I kept getting the same errors.