I issued the commands:
sudo apt-get clean && sudo apt-get autoremove
and get the following output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up update-notifier-common (3.192.30.17) ...
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 29, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
dpkg: error processing package update-notifier-common (--configure):
installed update-notifier-common package post-installation script subprocess returned error exit status 1
Setting up unattended-upgrades (2.3ubuntu0.3) ...
dpkg: error processing package unattended-upgrades (--configure):
installed unattended-upgrades package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of update-notifier:
update-notifier depends on update-notifier-common (= 3.192.30.17); however:
Package update-notifier-common is not configured yet.
dpkg: error processing package update-notifier (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager:
update-manager depends on update-notifier; however:
Package update-notifier is not configured yet.
dpkg: error processing package update-manager (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
Errors were encountered while processing:
update-notifier-common
unattended-upgrades
update-notifier
update-manager
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have searched stack exchange but have not been able to find a fix
ModuleNotFoundError: No module named 'apt_pkg'
is that the version of Python3 is no longer the stock version that came with Ubuntu. – user535733 Mar 22 '24 at 01:04apt list python3
– user535733 Mar 22 '24 at 01:11