“运行适用于 python3.5 的 python rtupdate 钩子”失败

“运行适用于 python3.5 的 python rtupdate 钩子”失败

我重新安装了 Ubuntu,但遇到了一些文件系统问题。现在我得到了这个:

$ sudo apt-get update
Hit:1 http://fr.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://ppa.launchpad.net/fingerprint/fprint/ubuntu xenial InRelease  
Hit:3 http://fr.archive.ubuntu.com/ubuntu xenial-updates InRelease                                   
Hit:4 http://fr.archive.ubuntu.com/ubuntu xenial-backports InRelease                                 
Hit:5 http://fr.archive.ubuntu.com/ubuntu xenial-proposed InRelease
Get:6 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [192 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [186 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [65.6 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [63.4 kB]
Fetched 609 kB in 3s (201 kB/s)                          
Reading package lists... Done

所以我认为到目前为止没有问题。然后:

$ sudo apt-get upgrade
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.
11 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.5.1-3) ...
running python rtupdate hooks for python3.5...
dpkg-query: package 'onboard' 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 onboard
error running python rtupdate hook onboard
dpkg-query: package 'python3-uno' 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 python3-uno
error running python rtupdate hook python3-uno
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-query: package 'rhythmbox' 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
error running python rtupdate hook rhythmbox
dpkg-query: package 'totem-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 totem-plugins
error running python rtupdate hook totem-plugins
dpkg-query: package 'ubuntu-drivers-common' 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 ubuntu-drivers-common
error running python rtupdate hook ubuntu-drivers-common
dpkg: error processing package python3 (--configure):
 subprocess installed post-installation script returned error exit status 4
dpkg: dependency problems prevent configuration of python3-gi:
 python3-gi depends on python3 (<< 3.6); however:
  Package python3 is not configured yet.
 python3-gi depends on python3 (>= 3.5~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-gi (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gir1.2-ibus-1.0:amd64:
 gir1.2-ibus-1.0:amd64 depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package gir1.2-ibus-1.0:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of hplip-data:
 hplip-data depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package hplip-data (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ibus:
 ibus depends on gir1.2-ibus-1.0 (= 1.5.11-1ubuntu2); however:
  Package gir1.2-ibus-1.0:amd64 is not configured yet.
 ibus depends on python3-gi; however:
  Package python3-gi is not configured yet.
 ibus depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package ibus (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ibus-table:
 ibus-table depends on ibus (>= 1.5.0); however:
  Package ibus is not configured yet.
 ibus-table depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package ibus-table (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-dev:
 python3-dev depends on python3 (= 3.5.1-3); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-dev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-pip:
 python3-pip depends on python3:any (>= 3.4~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-pip (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-pkg-resources:
 python3-pkg-resources depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-pkg-resources (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-setuptools:
 python3-setuptools depends on python3-pkg-resources (= 20.7.0-1); however:
  Package python3-pkg-resources is not configured yet.
 python3-setuptools depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-setuptools (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-wheel:
 python3-wheel depends on python3:any (>= 3.3.2-2~); however:
  Package python3 is not configured yet.

dpkg: error processing package python3-wheel (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3
 python3-gi
 gir1.2-ibus-1.0:amd64
 hplip-data
 ibus
 ibus-table
 python3-dev
 python3-pip
 python3-pkg-resources
 python3-setuptools
 python3-wheel
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

我得到了

dpkg: error processing package python3 (--configure):
 subprocess installed post-installation script returned error exit status 4

由于对系统中未安装的软件包具有 rtupdate 挂钩,因此输出与此类似/usr/share/python3/runtime.d

通过删除<missing-package-name>.rtupdate上述目录中的文件并重新安装 python3 来修复。

答案2

对于你的情况你只需执行:

sudo apt-get --fix-broken install
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install onboard -y

—NacreousDawn596,回答问题只是为了好玩。

相关内容