dpkg error while processing - can't install nor upgrade

Bug #1960583 reported by Duong Phan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Confirmed
Undecided
Unassigned
dpkg (Ubuntu)
Confirmed
Undecided
Unassigned

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

Duong Phan (sugar3103)
tags: added: jammy
Revision history for this message
Frank Bergemann (frank8812) wrote :

I had the same yesterday for a fresh new installed Ubuntu 22.04.
Maybe it helps to have information, that the file it complained about in /var/lib/dpkg/ was

 dpkg -> /var/lib/dpkg

This was definitely not created by myself, but by the system

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt (Ubuntu):
status: New → Confirmed
Changed in dpkg (Ubuntu):
status: New → Confirmed
Revision history for this message
Duong Phan (sugar3103) wrote :

I guess i have found the root cause of this issue.
When running the upgrade from 20.04 LTS to 22.04 LTS with terminal with this command :

```
sudo do-release-upgrade -d
```

it has an option for users to choose from whether to keep the old configuration file of

```
Configuration file '/etc/sysctl.conf'
==> Modified (by you or a script) since installation
==> Package distribution has shipped an updated version.
 What would you like to do about it ? Your options are :
  Y or I : Install the package maintainer's version
  N or O : keep your currently-installed version
    D : show the different between the versions
    Z : start a shell to examine the situation
The default action is to keep your current version.
*** sysctl.conf (Y/I/N/O/D/Z) [default=N] ?
```
(screenshot attached in this post)

If you choose N, the system will get the error (described in this ticket) with the update and upgrade process in the 22.04 LTS version.

Hope someone can do the actual test with this to verify.
Thanks

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.