Comment 2 for bug 1898717

Thank you for taking the time to file a bug report.

Based on the bug report above, the following snippet caught my attention:

Error: command ['/usr/sbin/apachectl', '-D DUMP_MODULES'] failed with exit code 1: apache2: Syntax error on line 142 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.2.load: Cannot load /usr/lib/apache2/modules/ into server: /usr/lib/apache2/modules/ cannot open shared object file: No such file or directory

This indicates that there is your Apache configuration file is trying to load, but cannot find it because, as can be checked in the DpkgTerminalLog.txt file, it's been disabled in favour of php7.4. This indicates that it is possible that there is an error your Apache configuration file.

Something else that made me frown was the following error (also in the DpkgTerminalLog.txt file)

Setting up apache2 (2.4.41-4ubuntu3.1) ...
info: Executing deferred 'a2enconf javascript-common' for package javascript-common
ERROR: Conf javascript-common does not exist!
dpkg: error processing package apache2 (--configure):
 installed apache2 package post-installation script subprocess returned error exit status 1

This does not make much sense, since the javascript-common package was installed just fine earlier. I tried reproducing this here (setting up a Bionic VM, installing apache2, javascript-common and libapache2-mod-php7.2, and the upgrading to Focal), but everything runs normally.

Since it seems likely to me that this is a local configuration problem,
rather than a bug in Ubuntu, I am marking this bug as 'Incomplete'.

However, if you believe that this is really a bug in Ubuntu, then we would
be grateful if you would provide a more complete description of the problem
with steps to reproduce, explain why you believe this is a bug in Ubuntu
rather than a problem specific to your system, and then change the bug
status back to "New".

For local configuration issues, you can find assistance here: