package libapache2-mod-php7.4 7.4.3-4ubuntu2.2 failed to install/upgrade: »installiertes libapache2-mod-php7.4-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück

Bug #1893559 reported by Michael Kuster
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php7.4 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

after

apache2 + php7.4 are installed
i did someting wrong with the apache2 config files and want get back the default config.

sudo apt purge apache2
sudo apt install apache2

was the php extension nomore available.

so i tryed:

sudo apt install libapache2-mod-php7.4 --reinstall

-> error occours

after that i

sudo apt purge libapache2-mod-php7.4
sudo apt install libapache2-mod-php7.4

look good now :-)

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: libapache2-mod-php7.4 7.4.3-4ubuntu2.2
ProcVersionSignature: Ubuntu 5.4.0-42.46-generic 5.4.44
Uname: Linux 5.4.0-42-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.8
AptOrdering:
 libapache2-mod-php7.4:amd64: Install
 NULL: ConfigurePending
Architecture: amd64
CasperMD5CheckResult: skip
Date: Sun Aug 30 15:16:38 2020
ErrorMessage: »installiertes libapache2-mod-php7.4-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück
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: php7.4
Title: package libapache2-mod-php7.4 7.4.3-4ubuntu2.2 failed to install/upgrade: »installiertes libapache2-mod-php7.4-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.apache2.mods-available.php7.4.conf: [deleted]
modified.conffile..etc.apache2.mods-available.php7.4.load: [deleted]

## DpkgTerminalLog ##
Preparing to unzip .../libapache2-mod-php7.4_7.4.3-4ubuntu2.2_amd64.deb ...
Extract from libapache2-mod-php7.4 (7.4.3-4ubuntu2.2) over(7.4.3-4ubuntu2.2) ...
libapache2-mod-php7.4 (7.4.3-4ubuntu2.2) is set up ...
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
dpkg: Error while configuring the package libapache2-mod-php7.4 (--configure):
 »installed libapache2-mod-php7.4-Script of the package post-installation«-Subprocess returned exit code 1

Revision history for this message
Michael Kuster (user240) wrote :
Bryce Harrington (bryce)
description: updated
Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Michael,

We've seen some idiosyncratic corner cases like this with mod_php, however I'm not able to replicate this particular one you've seen, so need some additional information on how to trigger it.

In a 20.04 LXD container, I tested:

$ sudo apt-get install apache2
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libaprutil1-dbd-sqlite3 libaprutil1-ldap libjansson4 liblua5.2-0
0 upgraded, 8 newly installed, 0 to remove and 58 not upgraded.
...

$ sudo apt-get install libapache2-mod-php7.4
The following NEW packages will be installed:
  libapache2-mod-php7.4 php-common php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-readline
0 upgraded, 7 newly installed, 0 to remove and 58 not upgraded.
...

# Verify php module is enabled:
$ ls -l /etc/apache2/mods-enabled/php*
lrwxrwxrwx 1 root root 29 Aug 31 17:52 /etc/apache2/mods-enabled/php7.4.conf -> ../mods-available/php7.4.conf
lrwxrwxrwx 1 root root 29 Aug 31 17:52 /etc/apache2/mods-enabled/php7.4.load -> ../mods-available/php7.4.load

# Purge apache2:
$ sudo apt purge apache2
The following packages will be REMOVED:
  apache2*

# No modules enabled at this point:
$ ls -ld /etc/apache2/mods-enabled
ls: cannot access '/etc/apache2/mods-enabled': No such file or directory

# Install apache2 again:
$ sudo apt install apache2

# Some modules are enabled, but not php*:
$ ls -l /etc/apache2/mods-enabled | wc -l
30
$ ls -l /etc/apache2/mods-enabled/php*
ls: cannot access '/etc/apache2/mods-enabled/php*': No such file or directory

# Now try to reinstall the php mod:
$ sudo apt install libapache2-mod-php7.4 --reinstall
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 58 not upgraded.
...
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php7.4

This is with:
  apache2 2.4.41-4ubuntu3.1
  libapache2-mod-php7.4 7.4.3-4ubuntu2.2

Can you see if you can reproduce the failure in a clean LXD container? I'm guessing there are some additional missing steps like adjustments to the apache or mod_php config files, or perhaps something else needing installed in addition to those two?

The error message refers to a "packaging script" returning an error code 1. A question to figure out is which script that is, and what is causing it to emit that particular error code. For LP: #1865218 (similar but not same as this), the script in question was libapache2-mod-php.postinst.extra, so that script would probably be the first thing I'd look at, but at this point I don't think we know what to look for. However, if you can help us in reproducing the issue synthetically then we can narrow down and isolate it.

Changed in php7.4 (Ubuntu):
status: New → Incomplete
Revision history for this message
Michael Kuster (user240) wrote : Re: [Bug 1893559] Re: package libapache2-mod-php7.4 7.4.3-4ubuntu2.2 failed to install/upgrade: »installiertes libapache2-mod-php7.4-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück

hi Bryce

thank you very much for your try to fix this! if i have the possibility to find a way to reproduce this bug, i will do so ;-)

bye michael

Am 31.08.20 um 20:17 schrieb Bryce Harrington:
> Hi Michael,
>
> We've seen some idiosyncratic corner cases like this with mod_php,
> however I'm not able to replicate this particular one you've seen, so
> need some additional information on how to trigger it.
>
> In a 20.04 LXD container, I tested:
>
> $ sudo apt-get install apache2
> The following NEW packages will be installed:
> apache2 apache2-bin apache2-data apache2-utils libaprutil1-dbd-sqlite3 libaprutil1-ldap libjansson4 liblua5.2-0
> 0 upgraded, 8 newly installed, 0 to remove and 58 not upgraded.
> ...
>
> $ sudo apt-get install libapache2-mod-php7.4
> The following NEW packages will be installed:
> libapache2-mod-php7.4 php-common php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-readline
> 0 upgraded, 7 newly installed, 0 to remove and 58 not upgraded.
> ...
>
> # Verify php module is enabled:
> $ ls -l /etc/apache2/mods-enabled/php*
> lrwxrwxrwx 1 root root 29 Aug 31 17:52 /etc/apache2/mods-enabled/php7.4.conf -> ../mods-available/php7.4.conf
> lrwxrwxrwx 1 root root 29 Aug 31 17:52 /etc/apache2/mods-enabled/php7.4.load -> ../mods-available/php7.4.load
>
> # Purge apache2:
> $ sudo apt purge apache2
> The following packages will be REMOVED:
> apache2*
>
> # No modules enabled at this point:
> $ ls -ld /etc/apache2/mods-enabled
> ls: cannot access '/etc/apache2/mods-enabled': No such file or directory
>
> # Install apache2 again:
> $ sudo apt install apache2
>
> # Some modules are enabled, but not php*:
> $ ls -l /etc/apache2/mods-enabled | wc -l
> 30
> $ ls -l /etc/apache2/mods-enabled/php*
> ls: cannot access '/etc/apache2/mods-enabled/php*': No such file or directory
>
> # Now try to reinstall the php mod:
> $ sudo apt install libapache2-mod-php7.4 --reinstall
> Reading state information... Done
> 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 58 not upgraded.
> ...
> apache2_switch_mpm Switch to prefork
> apache2_invoke: Enable module php7.4
>
> This is with:
> apache2 2.4.41-4ubuntu3.1
> libapache2-mod-php7.4 7.4.3-4ubuntu2.2
>
> Can you see if you can reproduce the failure in a clean LXD container?
> I'm guessing there are some additional missing steps like adjustments to
> the apache or mod_php config files, or perhaps something else needing
> installed in addition to those two?
>
> The error message refers to a "packaging script" returning an error code
> 1. A question to figure out is which script that is, and what is
> causing it to emit that particular error code. For LP: #1865218
> (similar but not same as this), the script in question was libapache2
> -mod-php.postinst.extra, so that script would probably be the first
> thing I'd look at, but at this point I don't think we know what to look
> for. However, if you can help us in reproducing the issue synthetically
> then we can narrow down and isolate it.
>
>
> ** Changed in: php7.4 (Ubuntu)
> Status: New => Incomplete
>

Bryce Harrington (bryce)
Changed in php7.4 (Ubuntu):
status: Incomplete → New
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in php7.4 (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.