package libapache2-mod-php7.0 7.0.4-7ubuntu2.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php7.0 (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
dpkg: error processing package libapache2-
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-
Package libapache2-
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.
libapache2-
libapache2-mod-php
E: Sub-process /usr/bin/dpkg returned an error code (1)
ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: libapache2-
ProcVersionSign
Uname: Linux 4.4.0-28-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
AptOrdering:
libapache2-
libapache2-
libapache2-
libapache2-
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)
RelatedPackageV
dpkg 1.18.4ubuntu1.1
apt 1.2.12~
SourcePackage: php7.0
Title: package libapache2-
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
modified.
tags: | removed: need-duplicate-check |
Changed in php7.0 (Ubuntu): | |
status: | Fix Committed → Incomplete |
Changed in php7.0 (Ubuntu): | |
status: | Expired → New |
Changed in php7.0 (Ubuntu): | |
status: | Confirmed → Incomplete |
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. apache2. conf
The assumption raised that it may due to the corruption of apache2.conf at /etc/apache2/
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 7.0/apache2/ conf.d 7.0/cli/ conf.d
/etc/php/
/etc/php/
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