Hi, I have followed the instructions to the letter on switch2osm.org but the server refuses to install apache2 as it conflicts with existing packages. This prevents the /hot/0/0/0.png link from working, it just 404s.

Message is as below:

tilesrv3708@100-200-300-400:~$ sudo apt install apache2
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
The following additional packages will be installed:
apache2-utils
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed
apache2 apache2-utils
0 to upgrade, 2 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
Need to get 0 B/187 kB of archives.
After this operation, 953 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database … 212523 files and directories currently installed.)
Preparing to unpack …/apache2-utils_2.4.52-1ubuntu4.9_amd64.deb …
Unpacking apache2-utils (2.4.52-1ubuntu4.9) …
dpkg: error processing archive /var/cache/apt/archives/apache2-utils_2.4.52-1ubuntu4.9_amd64.deb (–unpack):
trying to overwrite ‘/usr/bin/ab’, which is also in package ea-apache24-tools 2.4.59-1+1.1.cpanel
Preparing to unpack …/apache2_2.4.52-1ubuntu4.9_amd64.deb …
Unpacking apache2 (2.4.52-1ubuntu4.9) …
dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.52-1ubuntu4.9_amd64.deb (–unpack):
trying to overwrite ‘/usr/sbin/apachectl’, which is also in package ea-apache24 2.4.59-1+1.1.cpanel
Errors were encountered while processing:
/var/cache/apt/archives/apache2-utils_2.4.52-1ubuntu4.9_amd64.deb
/var/cache/apt/archives/apache2_2.4.52-1ubuntu4.9_amd64.deb
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Can anyone help? I’ve tried every way of uninstalling/reinstalling. The current version of apache on the server is Apache/2.4.59 (cPanel), can this be used to work with renderd/Mapnik?

I think you are better off asking this question on:

If you absolutely need to use the cPanel version of Apache, then I’d imagine that you’d be able to use mod_tile with that, but not install it cleanly. I’d probably do a clean install on another server and manually copy from there. However, the resulting “Frankenstein’s Monster” isn’t going to be easily maintainable.

If you don’t need cPanel’s version of Apache then remove that and install the latest Apache as normal.

Other options include Docker and various virtualisation options.