package apache2 2.4.7-1ubuntu4.8 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
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
ProcVersionSign
Uname: Linux 3.13.0-74-generic x86_64
Apache2ConfdDir
Apache2Modules:
Error: command ['/usr/
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:
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)
RelatedPackageV
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/
tags: | removed: need-duplicate-check |
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: apache2/ default- site/index. html’: No such file or directory
cp: cannot stat ‘/usr/share/
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.