package apache2 2.4.7-1ubuntu4.8 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1537480 reported by Ramesh
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Expired
Medium
Unassigned

Bug Description

apache2 installation failed...

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: apache2 2.4.7-1ubuntu4.8
ProcVersionSignature: Ubuntu 3.13.0-74.118-generic 3.13.11-ckt30
Uname: Linux 3.13.0-74-generic x86_64
Apache2ConfdDirListing: False
Apache2Modules:
 Error: command ['/usr/sbin/apachectl', '-D DUMP_MODULES'] failed with exit code 127: /usr/sbin/apachectl: 175: /usr/sbin/apachectl: /usr/sbin/apache2: not found
 Action '-D DUMP_MODULES' failed.
 The Apache error log may have more information.
ApportVersion: 2.14.1-0ubuntu3.19
AptOrdering:
 apache2: Install
 apache2: Configure
Architecture: amd64
Date: Sun Jan 24 17:56:23 2016
DuplicateSignature: package:apache2:2.4.7-1ubuntu4.8:subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2015-12-04 (51 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
RelatedPackageVersions:
 dpkg 1.17.5ubuntu5.5
 apt 1.0.1ubuntu2.10
SourcePackage: apache2
Title: package apache2 2.4.7-1ubuntu4.8 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)
error.log: Error: [Errno 2] No such file or directory: '/var/log/apache2/error.log'

Revision history for this message
Ramesh (rameskanth) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

There is a related fix to improve that since vivid (and debian) already in 2.4.10-7 and anything later.
It was not considered critical enough to be valid for an SRU.

That is around the code that checks if - in a new installation - there is no old content in /var/www[/html] and then it has to palce a new default index.html there.

In your case I see in the log that it is a new install of apache2 (after a lot of installs and removes/purges before).
It gets to the code and decides that there is nothing yet in /var/www so it has to place the new index.html

Then it fails there with:
cp: cannot stat ‘/usr/share/apache2/default-site/index.html’: No such file or directory

This file actually belongs to the apache2-data package - so it seems that dependency was not installed for you while you installed apache2.
The apache2 package clearly has a Dependency on it
Depends: lsb-base, procps, perl, mime-support, apache2-bin (= 2.4.7-1ubuntu4), apache2-data (= 2.4.7-1ubuntu4)

But in your DPKG Log there is never a mentioning of apache2-data which is weird.
It is not even a recommend, but a clear depends.

Still it is confusing why it wasn't brought in via the dependency.
If the error is reproducible and on your next "apt-get install apache2" you get no apache2-data installed by dependency please share:
- apt-cache show apache2
- full output of the apt-get install apache2
- dpkg -l '*apache*'
- apt-cache policy apache2
- apt-cache policy apache2-data

For a workaround I'd try:
- take a look when installing apache2 if apache2-data gets installed as dependency.
- if not consider installing it manually before apache2
That should get you going.

Changed in apache2 (Ubuntu):
importance: Undecided → Medium
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.