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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1597315

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php7.0/+bug/1597315/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to