Ubuntu 16.04 When I restore my system from backup after system fault, I got broken apt.
When I trying use apt, for example:
$ sudo apt install pyroom
Setting up python3 (3.5.1-3) ...
running python rtupdate hooks for python3.5...
dpkg-query: package 'rhythmbox-plugins' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
File "/usr/bin/py3clean", line 210, in <module>
main()
File "/usr/bin/py3clean", line 196, in main
pfiles = set(dpf.from_package(options.package))
File "/usr/share/python3/debpython/files.py", line 53, in from_package
raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of rhythmbox-plugins
error running python rtupdate hook rhythmbox-plugins
dpkg: error processing package python3 (--configure):
subprocess installed post-installation script returned error exit status 4
Errors were encountered while processing:
python3
E: Sub-process /usr/bin/dpkg returned an error code (1)
When I check my apt list:
$ apt list python3.5
Listing... Done
python3.5/xenial-updates,xenial-security,now 3.5.2-2ubuntu0~16.04.1 amd64 [installed,automatic]
When I try reconfigure, I got errors:
$ sudo dpkg --configure -a
Setting up python3 (3.5.1-3) ...
running python rtupdate hooks for python3.5...
dpkg-query: package 'rhythmbox-plugins' is not installed
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Traceback (most recent call last):
File "/usr/bin/py3clean", line 210, in <module>
main()
File "/usr/bin/py3clean", line 196, in main
pfiles = set(dpf.from_package(options.package))
File "/usr/share/python3/debpython/files.py", line 53, in from_package
raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of rhythmbox-plugins
error running python rtupdate hook rhythmbox-plugins
dpkg: error processing package python3 (--configure):
subprocess installed post-installation script returned error exit status 4
dpkg: dependency problems prevent processing triggers for gnome-menus:
gnome-menus depends on python3:any (>= 3.1~); however:
Package python3 is not configured yet.
dpkg: error processing package gnome-menus (--configure):
dependency problems - leaving triggers unprocessed
Errors were encountered while processing:
python3
gnome-menus
What can I do to fix that?
I spent several days to find solution. I investigated that currently different package dependencies:
$ apt list python3.5
Listing... Done
python3.5/xenial-updates,xenial-security,now 3.5.2-2ubuntu0~16.04.1 amd64 [installed,automatic]
but broken dependency: Python 3.5.1-3
.
I deleted packages depended from Python 3.5.1
and installed them again.
Then run:
$ sudo dpkg --configure -a
I got successful result.