When running app upgrade
I get the following errors:
$ sudo sudo apt upgrade
[sudo] password for admin-federico-dostuni:
Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:5 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease
Hit:6 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease
Fetched 172 kB in 1s (176 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up update-notifier-common (3.192.1.15) ...
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 24, in <module>
import debian.deb822
File "/usr/lib/python3/dist-packages/Debian/deb822.py", line 78, in <module>
class TagSectionWrapper(collections.Mapping):
AttributeError: module 'collections' has no attribute 'Mapping'
dpkg: error processing package update-notifier-common (--configure):
installed update-notifier-common package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
update-notifier-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Looking online it looks like that the issue is caused by a missing collections.Mapping
attribute in the debian.deb822
module. To resolve the issue I should:
- List item
Remove the package update-notifier-common
sudo dpkg --remove --force-remove-reinstreq update-notifier-common
- Update apt, and reinstall
update-notifier-common
sudo apt-get install update-notifier-common
The problem is that I can't pass the 1st step because I got this error message:
sudo dpkg --remove --force-remove-reinstreq update-notifier-common
dpkg: dependency problems prevent removal of update-notifier-common:
ubuntu-server depends on update-notifier-common.
dpkg: error processing package update-notifier-common (--remove):
dependency problems - not removing
Errors were encountered while processing:
update-notifier-common
I checked update-notifier-common
dependencies and it doesn't look good:
$ apt-cache rdepends update-notifier-common
update-notifier-common
Reverse Depends:
update-notifier
flashplugin-installer
ubuntu-server
debconf
ttf-mscorefonts-installer
apt-config-auto-update
reboot-notifier
apt-config-auto-update
update-notifier
debconf
ubuntu-server
byobu
How can I safely remove update-notifier-common
without messing up the whole OS?