package apache2 2.4.52-1ubuntu4.7 failed to install/upgrade: installed apache2 package post-installation script subprocess returned error exit status 1 - Crash on "do-release-upgrade" from Ubuntu 20.04 to Ubuntu 22.04
This bug report will be marked for expiration in 8 days if no further activity occurs. (find out why)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
I am upgrading my Ubuntu 20.04 LEMP server, that DOES NOT have apache2 installed. Instead it uses Nginx Mainline from the official Nginx Repository. After running the command "do-release-
Here is my server information:
Hardware: Raspberry Pi 4 (aarch64)
OS: Ubuntu 20.04 Server, currently upgrading to Ubuntu 22.04 Server
Software: Linux, Nginx Mainline, MariaDB 10.10.7, PHP7.4-fpm, Postfix, Dovecot
PREPARATION FOR UPGRADE:
sudo service --status-all
[ + ] amavis
[ - ] amavis-mc
[ - ] amavisd-
[ - ] amplify-agent
[ + ] apparmor
[ + ] apport
[ + ] atd
[ + ] binfmt-support
[ + ] clamav-daemon
[ + ] clamav-freshclam
[ - ] console-setup.sh
[ + ] cron
[ - ] cryptdisks
[ - ] cryptdisks-early
[ + ] dbus
[ + ] dovecot
[ - ] dphys-swapfile
[ + ] fail2ban
[ - ] gdomap
[ - ] hwclock.sh
[ + ] irqbalance
[ - ] iscsid
[ - ] keyboard-setup.sh
[ + ] kmod
[ - ] lvm2
[ - ] lvm2-lvmpolld
[ + ] mariadb
[ + ] mono-xsp4
[ + ] multipath-tools
[ + ] mysql
[ + ] network-manager
[ - ] nginx
[ - ] nginx-debug
[ - ] open-iscsi
[ + ] opendkim
[ + ] opendmarc
[ + ] php7.4-fpm
[ - ] plymouth
[ - ] plymouth-log
[ + ] policyd-rate-limit
[ + ] postfix
[ + ] postgrey
[ - ] pppd-dns
[ + ] procps
[ + ] redis-server
[ - ] resolvconf
[ - ] rsync
[ + ] rsyslog
[ + ] spamass-milter
[ + ] spamassassin
[ + ] ssh
[ + ] tlp
[ + ] udev
[ + ] ufw
[ + ] unattended-upgrades
[ + ] unbound
[ - ] uuidd
[ - ] x11-common
DISABLE EVERYTHING and SET UP in one command:
-------
sudo systemctl disable cron \
sudo systemctl disable amavis \
sudo systemctl disable amplify-agent \
sudo systemctl disable atd \
sudo systemctl disable clamav-daemon \
sudo systemctl disable clamav-freshclam \
sudo systemctl disable dovecot \
sudo systemctl disable fail2ban \
sudo systemctl disable irqbalance \
sudo systemctl disable kmod \
sudo systemctl disable mono-xsp4 \
sudo systemctl disable nginx \
sudo systemctl disable opendkim \
sudo systemctl disable opendmarc \
sudo systemctl disable php7.4-fpm \
sudo systemctl disable postfix \
sudo systemctl disable postgrey \
sudo systemctl disable redis-server \
sudo systemctl disable smbd \
sudo systemctl disable nmbd \
sudo systemctl disable spamass-milter \
sudo systemctl disable spamassassin \
sudo systemctl disable tlp \
sudo systemctl disable unbound \
sudo systemctl disable create-
sudo systemctl disable webmin.service \
sudo systemctl disable <email address hidden> \
sudo systemctl disable dphys-swapfile \
sudo systemctl disable netdata \
sudo systemctl disable policyd-rate-limit \
sudo systemctl restart sshd \
sudo service ssh restart \
sudo apt purge phpmyadmin mono-xsp4 nginx-agent \
sudo apt autoremove \
sudo apt-mark unhold nginx \
sudo apt install screen \
screen \
sudo apt update \
sudo apt dist-upgrade \
sudo apt install update-manager-core \
do-release-upgrade
-------
Below is all of the rest of the information that I have on this error.
Files have not changed, Decompression not needed
Exception during pm.DoInstall(): E:Sub-process /usr/bin/dpkg returned an error code (1)
*** Send problem report to the developers?
After the problem report has been sent, please fill out the form in the
automatically opened web browser.
What would you like to do? Your options are:
S: Send report (836.5 KB)
V: View report
K: Keep report file for sending later or copying to somewhere else
I: Cancel and ignore future crashes of this program version
C: Cancel
Please choose (S/V/K/I/C): S
*** Collecting problem information
The collected information can be sent to the developers to improve the
application. This might take a few minutes.
.......
*** The contents of your /etc/apache2/
What would you like to do? Your options are:
Y: Yes
N: No
C: Cancel
Please choose (Y/N/C): Y
The collected information is being sent to the bug tracking system.
This might take a few minutes.
99%
*** To continue, you must visit the following URL: xxx.xxx.
That is all I've got.
ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: apache2 2.4.52-1ubuntu4.7
ProcVersionSign
Uname: Linux 5.4.0-1104-raspi aarch64
000-default.conf: Error: [Errno 40] Too many levels of symbolic links: '/etc/apache2/
Apache2ConfdDir
Apache2Modules:
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: arm64
CasperMD5CheckR
CloudArchitecture: aarch64
CloudID: nocloud
CloudName: unknown
CloudPlatform: nocloud
CloudSubPlatform: config-disk (/dev/sda1)
Date: Sat Mar 9 23:53:15 2024
ErrorMessage: installed apache2 package post-installation script subprocess returned error exit status 1
Python3Details: /usr/bin/
PythonDetails: N/A
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageV
dpkg 1.21.1ubuntu2.3
apt 2.4.11
SourcePackage: apache2
Title: package apache2 2.4.52-1ubuntu4.7 failed to install/upgrade: installed apache2 package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to jammy on 2024-03-10 (0 days ago)
error.log:
tags: | removed: need-duplicate-check |
I forgot one thing. Before I did the release upgrade, I also stopped all of the services that I disabled with the following one liner:
sudo systemctl stop cron \ cacheram- folders. service \
sudo systemctl stop amavis \
sudo systemctl stop amplify-agent \
sudo systemctl stop atd \
sudo systemctl stop clamav-daemon \
sudo systemctl stop clamav-freshclam \
sudo systemctl stop dovecot \
sudo systemctl stop fail2ban \
sudo systemctl stop irqbalance \
sudo systemctl stop kmod \
sudo systemctl stop mono-xsp4 \
sudo systemctl stop nginx \
sudo systemctl stop opendkim \
sudo systemctl stop opendmarc \
sudo systemctl stop php7.4-fpm \
sudo systemctl stop postfix \
sudo systemctl stop postgrey \
sudo systemctl stop redis-server \
sudo systemctl stop smbd \
sudo systemctl stop nmbd \
sudo systemctl stop spamass-milter \
sudo systemctl stop spamassassin \
sudo systemctl stop tlp \
sudo systemctl stop unbound \
sudo systemctl stop create-
sudo systemctl stop webmin.service \
sudo systemctl stop <email address hidden> \
sudo systemctl stop dphys-swapfile \
sudo systemctl stop netdata \
sudo systemctl stop policyd-rate-limit
Then I proceeded with the Release upgrade.