package apache2 2.4.41-4ubuntu3.1 failed to install/upgrade: installed apache2 package post-installation script subprocess returned error exit status 1

Bug #1915826 reported by Katarina
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Undecided
Unassigned

Bug Description

It shows that installed apache2, but it doesn't show in /etc when i want to change file sudo nano /etc/apache2/sites-available/localhost.conf

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: apache2 2.4.41-4ubuntu3.1
ProcVersionSignature: Ubuntu 5.8.0-43.49~20.04.1-generic 5.8.18
Uname: Linux 5.8.0-43-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
Apache2ConfdDirListing: False
Apache2Modules:
 Error: command ['/usr/sbin/apachectl', '-D DUMP_MODULES'] failed with exit code 127: /usr/sbin/apachectl: 208: /usr/sbin/apache2: not found
 Action '-D DUMP_MODULES' failed.
 The Apache error log may have more information.
ApportVersion: 2.20.11-0ubuntu27.16
AptOrdering:
 apache2:amd64: Install
 NULL: ConfigurePending
Architecture: amd64
CasperMD5CheckResult: skip
Date: Tue Feb 16 14:49:33 2021
ErrorMessage: installed apache2 package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2020-09-29 (140 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18, python-is-python2, 2.7.17-4
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.4
SourcePackage: apache2
Title: package apache2 2.4.41-4ubuntu3.1 failed to install/upgrade: installed apache2 package post-installation script subprocess 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
Katarina (krivace) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thank you for taking the time to file a bug report.

We will need more information in order to proceed with the investigation of the bug. Based on the logs posted, I could not determine the cause for the error message.

When I repeat the steps described in the DpkgHistoryLog.log in a Focal container, namely:

# apt-get install apache2
# apt-get purge apache2
# apt-get autoremove --purge
# apt-get install apache2

Everything works as expected. Bear in mind, I have not modified any configuration file when running these tests. Therefore, I would like to ask you to provide:

1) More log files, especifically the Apache2 ones: /var/log/apache2/*, and "journalctl -u apache2.service".

2) Any custom configuration files for Apache2 that you might have.

Since there is not enough information in your report to begin triage or to
differentiate between a local configuration problem and a bug in Ubuntu, I
am marking this bug as "Incomplete". We would be grateful if you would:
provide a more complete description of the problem, explain why you
believe this is a bug in Ubuntu rather than a problem specific to your
system, and then change the bug status back to "New".

For local configuration issues, you can find assistance here:
http://www.ubuntu.com/support/community

Changed in apache2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Bryce was able to provide a possible reproducer:

# apt install apache2
# rm -rf /usr/share/apache2/default-site/
# apt purge apache2
# apt install apache2

I'm marking this bug as Triaged.

@Katarina, could you confirm whether you've removed /usr/share/apache2/default-site/ before purging the apache2 package?

The workaround for this bug is to:

# apt purge apache2*
# apt install apache2

Changed in apache2 (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Katarina (krivace) wrote : Re: [Bug 1915826] Re: package apache2 2.4.41-4ubuntu3.1 failed to install/upgrade: installed apache2 package post-installation script subprocess returned error exit status 1

I have solved it, thank you for helping me.

On Wed, Feb 17, 2021 at 7:40 PM Sergio Durigan Junior <
<email address hidden>> wrote:

> Bryce was able to provide a possible reproducer:
>
> # apt install apache2
> # rm -rf /usr/share/apache2/default-site/
> # apt purge apache2
> # apt install apache2
>
> I'm marking this bug as Triaged.
>
> @Katarina, could you confirm whether you've removed /usr/share/apache2
> /default-site/ before purging the apache2 package?
>
> The workaround for this bug is to:
>
> # apt purge apache2*
> # apt install apache2
>
> ** Changed in: apache2 (Ubuntu)
> Status: Incomplete => Triaged
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1915826
>
> Title:
> package apache2 2.4.41-4ubuntu3.1 failed to install/upgrade: installed
> apache2 package post-installation script subprocess returned error
> exit status 1
>
> Status in apache2 package in Ubuntu:
> Triaged
>
> Bug description:
> It shows that installed apache2, but it doesn't show in /etc when i
> want to change file sudo nano /etc/apache2/sites-
> available/localhost.conf
>
> ProblemType: Package
> DistroRelease: Ubuntu 20.04
> Package: apache2 2.4.41-4ubuntu3.1
> ProcVersionSignature: Ubuntu 5.8.0-43.49~20.04.1-generic 5.8.18
> Uname: Linux 5.8.0-43-generic x86_64
> NonfreeKernelModules: nvidia_modeset nvidia
> Apache2ConfdDirListing: False
> Apache2Modules:
> Error: command ['/usr/sbin/apachectl', '-D DUMP_MODULES'] failed with
> exit code 127: /usr/sbin/apachectl: 208: /usr/sbin/apache2: not found
> Action '-D DUMP_MODULES' failed.
> The Apache error log may have more information.
> ApportVersion: 2.20.11-0ubuntu27.16
> AptOrdering:
> apache2:amd64: Install
> NULL: ConfigurePending
> Architecture: amd64
> CasperMD5CheckResult: skip
> Date: Tue Feb 16 14:49:33 2021
> ErrorMessage: installed apache2 package post-installation script
> subprocess returned error exit status 1
> InstallationDate: Installed on 2020-09-29 (140 days ago)
> InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64
> (20200731)
> Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal,
> 3.8.2-0ubuntu2
> PythonDetails: /usr/bin/python2.7, Python 2.7.18, python-is-python2,
> 2.7.17-4
> RelatedPackageVersions:
> dpkg 1.19.7ubuntu3
> apt 2.0.4
> SourcePackage: apache2
> Title: package apache2 2.4.41-4ubuntu3.1 failed to install/upgrade:
> installed apache2 package post-installation script subprocess 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'
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1915826/+subscriptions
>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers