package libapache2-mod-php7.0 7.0.4-7ubuntu2.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1597315 reported by CEO
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
php7.0 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

dpkg: error processing package libapache2-mod-php7.0 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libapache2-mod-php:
 libapache2-mod-php depends on libapache2-mod-php7.0; however:
  Package libapache2-mod-php7.0 is not configured yet.

dpkg: error processing package libapache2-mod-php (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 libapache2-mod-php7.0
 libapache2-mod-php
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: libapache2-mod-php7.0 7.0.4-7ubuntu2.1
ProcVersionSignature: Ubuntu 4.4.0-28.47-generic 4.4.13
Uname: Linux 4.4.0-28-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
AptOrdering:
 libapache2-mod-php7.0: Install
 libapache2-mod-php: Install
 libapache2-mod-php7.0: Configure
 libapache2-mod-php: Configure
 NULL: ConfigurePending
Architecture: amd64
Date: Wed Jun 29 21:45:08 2016
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2016-06-14 (14 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.12~ubuntu16.04.1
SourcePackage: php7.0
Title: package libapache2-mod-php7.0 7.0.4-7ubuntu2.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.apache2.mods-available.php7.0.conf: [deleted]
modified.conffile..etc.apache2.mods-available.php7.0.load: [deleted]

Revision history for this message
CEO (unity.digital) wrote :
tags: removed: need-duplicate-check
Revision history for this message
CEO (unity.digital) wrote :

Further investigation revealed that the libapache2-mod-php was not able to install php.load and php.conf into the apache2 available modules at /etc/apache2/mods-available.
The assumption raised that it may due to the corruption of apache2.conf at /etc/apache2/apache2.conf
Replacement of the file did not fixed the problem. Neither reinstallation of Apache2. Therefor, the last option was to purge the apache2, php and libapache2-mod-php.
sudo apt-get remove --purge apache2, php, php7.0, php-common, libapache2-mod-php
This action revealed that the following directories cannot be deleted by the system. It might be due to the corruption of the configuration files:

/etc/apache2/apache2.conf
/etc/php/7.0/apache2/conf.d
/etc/php/7.0/cli/conf.d

Manully removing them and reinstalling the apache2, php, and libapache2-mod-php solved the problem:

sudo rm -r /etc/apache2 /etc/php
sudo apt-get install apache2 php libapache2-mod-php

After this action, the problem has been rectified. The two files php.conf and php.load are successfully installed in /etc/apache2/mods-available. This module is enabled automatically at /etc/apache2/mods-enabled

Revision history for this message
CEO (unity.digital) wrote :

Solved

Changed in php7.0 (Ubuntu):
assignee: nobody → CEO (unity.digital)
status: New → Fix Committed
status: Fix Committed → Incomplete
status: Incomplete → Fix Committed
assignee: CEO (unity.digital) → nobody
Nish Aravamudan (nacc)
Changed in php7.0 (Ubuntu):
status: Fix Committed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in php7.0 (Ubuntu):
status: Incomplete → Expired
Abby (nichoabb)
Changed in php7.0 (Ubuntu):
status: Expired → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in php7.0 (Ubuntu):
status: New → Confirmed
Nish Aravamudan (nacc)
Changed in php7.0 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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