16.04 -> 18.04 -> 20.04, do-release-upgrade from 18.04: package apache2 2.4.41-4ubuntu3.1 failed to install/upgrade: installed apache2 package post-installation script subprocess returned error exit status 1

Bug #1898717 reported by Luca Righi
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Upgraded from 16.04 to 18.04 with do-release-upgrade.
Upgrading from 18.04 to 20.04 raise the error during the 'do-release-upgrade' process.

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: apache2 2.4.41-4ubuntu3.1
ProcVersionSignature: Ubuntu 4.15.0-118.119-generic 4.15.18
Uname: Linux 4.15.0-118-generic x86_64
Apache2ConfdDirListing: False
Apache2Modules:
 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/libphp7.2.so into server: /usr/lib/apache2/modules/libphp7.2.so: cannot open shared object file: No such file or directory
 Action '-D DUMP_MODULES' failed.
 The Apache error log may have more information.
ApportVersion: 2.20.11-0ubuntu27.9
Architecture: amd64
CasperMD5CheckResult: skip
Date: Tue Oct 6 11:52:27 2020
ErrorMessage: installed apache2 package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2015-02-09 (2065 days ago)
InstallationMedia: Ubuntu-Server 12.04.2 LTS "Precise Pangolin" - Release amd64 (20130214)
Python3Details: /usr/bin/python3.8, Python 3.8.2, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18rc1, python-is-python2, 2.7.17-4
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.2ubuntu0.1
SourcePackage: apache2
Title: package apache2 2.4.41-4ubuntu3.1 failed to install/upgrade: installed apache2 package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to focal on 2020-10-06 (0 days ago)
modified.conffile..etc.apache2.apache2.conf: [modified]
modified.conffile..etc.apache2.conf-available.localized-error-pages.conf: [modified]
modified.conffile..etc.apache2.mods-available.mpm_prefork.conf: [modified]
modified.conffile..etc.apache2.sites-available.000-default.conf: [modified]
modified.conffile..etc.apache2.sites-available.default-ssl.conf: [modified]
mtime.conffile..etc.apache2.apache2.conf: 2019-11-07T14:52:11.443278
mtime.conffile..etc.apache2.conf-available.localized-error-pages.conf: 2015-02-11T16:20:09.555289
mtime.conffile..etc.apache2.mods-available.mpm_prefork.conf: 2015-02-22T09:12:59.437382
mtime.conffile..etc.apache2.sites-available.000-default.conf: 2018-10-21T18:58:36.876693
mtime.conffile..etc.apache2.sites-available.default-ssl.conf: 2019-11-07T15:13:55.403891

Revision history for this message
Luca Righi (lucarighi) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

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/libphp7.2.so into server: /usr/lib/apache2/modules/libphp7.2.so: cannot open shared object file: No such file or directory

This indicates that there is your Apache configuration file is trying to load libphp7.2.so, 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:
http://www.ubuntu.com/support/community

Changed in apache2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for apache2 (Ubuntu) because there has been no activity for 60 days.]

Changed in apache2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.