[Bug 1960582] Re: [critical] dpkg error while processing - can't install nor upgrade
Gene Weber
1960582 at bugs.launchpad.net
Thu Sep 1 09:36:38 UTC 2022
I ran into this same problem when doing a release upgrade on an AWS EC2
instance. I have not been able to fix a broken upgrade, but here is how
to do a successful upgrade.
An "ls" on a brand new EC2 instance running 20.04.1 shows this:
$ ls -lat /var/lib/dpkg
total 1752
drwxr-xr-x 2 root root 4096 Sep 1 09:19 updates
drwxr-xr-x 7 root root 4096 Sep 1 09:19 .
-rw-r--r-- 1 root root 706338 Sep 1 09:19 status
-rw-r----- 1 root root 0 Sep 1 09:19 lock
-rw-r--r-- 1 root root 706377 Sep 1 09:19 status-old
drwxr-xr-x 2 root root 143360 Sep 1 09:19 info
drwxr-xr-x 47 root root 4096 Sep 1 09:19 ..
drwxr-xr-x 2 root root 4096 Sep 1 09:19 triggers
-rw-r--r-- 1 root root 135 Sep 1 09:19 statoverride
drwxr-xr-x 2 root root 4096 Sep 1 09:19 alternatives
-rw-r--r-- 1 root root 268 Nov 29 2021 diversions
-rw-r--r-- 1 root root 336 Nov 29 2021 diversions-old
-rw-r--r-- 1 root root 100 Nov 29 2021 statoverride-old
-rw-r----- 1 root root 0 Nov 29 2021 lock-frontend
-rw-r--r-- 1 root root 181566 Nov 29 2021 available
-rw-r--r-- 1 root root 8 Nov 29 2021 cmethopt
drwxr-xr-x 2 root root 4096 Mar 23 2020 parts
Trying to run a "do-release-upgrade" will not work if any 20.04.01
packages need to be upgraded. If "sudo apt upgrade" is run, "ls" now
shows this:
$ ls -lat /var/lib/dpkg
total 1752
drwxr-xr-x 7 root root 4096 Sep 1 09:23 .
lrwxrwxrwx 1 root root 13 Sep 1 09:23 dpkg -> /var/lib/dpkg
drwxr-xr-x 2 root root 4096 Sep 1 09:21 updates
-rw-r--r-- 1 root root 707850 Sep 1 09:21 status
drwxr-xr-x 2 root root 143360 Sep 1 09:21 info
-rw-r----- 1 root root 0 Sep 1 09:21 lock
-rw-r----- 1 root root 0 Sep 1 09:21 lock-frontend
-rw-r--r-- 1 root root 707587 Sep 1 09:21 status-old
drwxr-xr-x 47 root root 4096 Sep 1 09:19 ..
drwxr-xr-x 2 root root 4096 Sep 1 09:19 triggers
-rw-r--r-- 1 root root 135 Sep 1 09:19 statoverride
drwxr-xr-x 2 root root 4096 Sep 1 09:19 alternatives
-rw-r--r-- 1 root root 268 Nov 29 2021 diversions
-rw-r--r-- 1 root root 336 Nov 29 2021 diversions-old
-rw-r--r-- 1 root root 100 Nov 29 2021 statoverride-old
-rw-r--r-- 1 root root 181566 Nov 29 2021 available
-rw-r--r-- 1 root root 8 Nov 29 2021 cmethopt
drwxr-xr-x 2 root root 4096 Mar 23 2020 parts
Proceeding with "do-release-upgrade" at this point breaks. But if I
"sudo unlink /var/lib/dpkg/dpkg" before doing the "do-release-upgrade",
the upgrade to 22.04 is successful.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dpkg in Ubuntu.
https://bugs.launchpad.net/bugs/1960582
Title:
[critical] dpkg error while processing - can't install nor upgrade
Status in dpkg package in Ubuntu:
Incomplete
Bug description:
My current ubuntu version :
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Jammy Jellyfish (development branch)
Release: 22.04
Codename: jammy
Issue :
when `sudo apt update` is ok, all newest package is downloaded
but `sudo apt ugprade` show current error : ]
sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
librygel-renderer-2.6-2 librygel-server-2.6-2 rygel
The following packages will be upgraded:
bolt code deja-dup enchant-2 fwupd gdm3 gir1.2-gdm-1.0 gir1.2-gst-plugins-base-1.0 gir1.2-nm-1.0 gir1.2-nma-1.0
gir1.2-upowerglib-1.0 gjs gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-plugins-base
gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-good gstreamer1.0-pulseaudio gstreamer1.0-x initramfs-tools
initramfs-tools-bin initramfs-tools-core iputils-ping iputils-tracepath language-pack-en language-pack-gnome-en
libenchant-2-2 libfwupd2 libfwupdplugin5 libgdm1 libgjs0g libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0
libgstreamer-plugins-good1.0-0 libnl-3-200 libnl-genl-3-200 libnl-route-3-200 libnm0 libnma-common libnma0
libpkcs11-helper1 libseccomp2 libunistring2 libunistring2:i386 libupower-glib3 media-types nano network-manager
network-manager-config-connectivity-ubuntu python3-paramiko python3-software-properties simple-scan
software-properties-common software-properties-gtk upower
56 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
10 not fully installed or removed.
Need to get 0 B/94,6 MB of archives.
After this operation, 1.928 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up dpkg (1.21.1ubuntu1) ...
head: error reading 'dpkg': Is a directory
dpkg: error processing package dpkg (--configure):
installed dpkg package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
dpkg
E: Sub-process /usr/bin/dpkg returned an error code (1)
i have to resintall all of the package in cache with `sudo dpkg -i /var/cache/apt/archives/*.deb
`, but the cache sometimes is not the newest packages
and when i rerun `sudo apt upgrade`, there is still not the newest package
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1960582/+subscriptions
More information about the foundations-bugs
mailing list