0%

running python rtupdate hooks for python3.5x

今天在 24 上装软件遇到这个问题,经过搜索,解决这个问题:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
taseikyo@node ~> sai gcc make libncurses5-dev openssl libssl-dev 
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3 is already the newest version (3.7.5-1).
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 python3 (3.7.5-1) ...
running python rtupdate hooks for python3.7...
dpkg-query: package 'rhythmbox-plugin-alternative-toolbar' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files 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-plugin-alternative-toolbar
error running python rtupdate hook rhythmbox-plugin-alternative-toolbar
dpkg-query: package 'rhythmbox-plugins' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files 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-query: package 'sosreport' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files 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 sosreport
error running python rtupdate hook sosreport
dpkg-query: package 'streamlink' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files 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 streamlink
error running python rtupdate hook streamlink
dpkg: error processing package python3 (--configure):
installed python3 package post-installation script subprocess returned error exit status 4
Errors were encountered while processing:
python3
E: Sub-process /usr/bin/dpkg returned an error code (1)

with similar output all around due to having rtupdate hooks for packages that were not installed on the system in /usr/share/python3/runtime.d.

Fixed by removing the <missing-package-name>.rtupdate files in the directory above and reinstalling python3.

将错误信息中的 xxx.rtupdate 从 /usr/share/python3/runtime.d 目录删除,然后重装 Python3 然后就好了。

1
2
3
4
5
6
7
8
9
10
taseikyo@node ~> sai gcc make libncurses5-dev openssl libssl-dev 
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version (4:9.2.1-3.1ubuntu1).
libncurses5-dev is already the newest version (6.1+20190803-1ubuntu1).
libssl-dev is already the newest version (1.1.1c-1ubuntu4.1).
make is already the newest version (4.2.1-1.2).
openssl is already the newest version (1.1.1c-1ubuntu4.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Welcome to my other publishing channels