所以我最近安装了 Ubunut 22.04.1(与 Windows 10 双启动),第一次运行“apt-get upgrade”时出现以下错误,我无法在任何地方找到解决方案。
E: py3compile:212: cannot create directory /usr/share/ibus-table/engine/__pycache__: FileNotFoundError(2, 'No such file or directory')
[Errno 2] No such file or directory: '/usr/share/ibus-table/engine/factory.py'error running python rtupdate hook ibus-table
我不确定这是错误还是我遗漏了某些东西,我执行了 apt-get update,但没有帮助,以下是日志
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
firmware-sof-signed gir1.2-javascriptcoregtk-4.0 gir1.2-webkit2-4.0 libjavascriptcoregtk-4.0-18 libnfsidmap1 libudev1
libwebkit2gtk-4.0-37 linux-generic-hwe-22.04 linux-headers-generic-hwe-22.04 linux-image-generic-hwe-22.04 rsync
ubiquity-casper udev
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
27 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up python3 (3.10.6-1~22.04) ...
running python rtupdate hooks for python3.10...
E: py3compile:212: cannot create directory /usr/share/ibus-table/engine/__pycache__: FileNotFoundError(2, 'No such file or directory')
[Errno 2] No such file or directory: '/usr/share/ibus-table/engine/factory.py'error running python rtupdate hook ibus-table
dpkg: error processing package python3 (--configure):
installed python3 package post-installation script subprocess returned error exit status 4
dpkg: dependency problems prevent configuration of sssd-common:
sssd-common depends on python3; however:
Package python3 is not configured yet.
dpkg: error processing package sssd-common (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sssd-proxy:
sssd-proxy depends on sssd-common (= 2.6.3-1ubuntu3.2); however:
Package sssd-common is not configured yet.
dpkg: error processing package sssd-proxy (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-distupgrade:
python3-distupgrade depends on python3:any; however:
Package python3 is not configured yet.
dpkg: error processing package python3-distupgrade (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-sss:
python3-sss depends on python3 (<< 3.11); however:
Package python3 is not configured yet.
python3-sss depends on python3 (>= 3.10~)No apport report written because the error message indicates its a followup error from a previous failure.
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
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
; however:
Package python3 is not configured yet.
python3-sss depends on python3:any; however:
Package python3 is not configured yet.
dpkg: error processing package python3-sss (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-properties-common:
software-properties-common depends on python3; however:
Package python3 is not configured yet.
software-properties-common depends on python3:any; however:
Package python3 is not configured yet.
dpkg: error processing package software-properties-common (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of netplan.io:
netplan.io depends on python3; however:
Package python3 is not configured yet.
dpkg: error processing package netplan.io (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sssd-ipa:
sssd-ipa depends on sssd-common (= 2.6.3-1ubuntu3.2); No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
however:
Package sssd-common is not configured yet.
dpkg: error processing package sssd-ipa (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-oauthlib:
python3-oauthlib depends on python3:any; however:
Package python3 is not configured yet.
dpkg: error processing package python3-oauthlib (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-software-properties:
python3-software-properties depends on python3; however:
Package python3 is not configured yet.
python3-software-properties depends on python3:any; however:
Package python3 is not configured yet.
dpkg: error processing package python3-software-properties (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sssd-ad-common:
sssd-ad-common depends on sssd-common (= 2.6.3-1ubuntu3.2); however:
Package sssd-common is not configured yeNo apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
t.
dpkg: error processing package sssd-ad-common (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sssd-krb5-common:
sssd-krb5-common depends on sssd-common (= 2.6.3-1ubuntu3.2); however:
Package sssd-common is not configured yet.
dpkg: error processing package sssd-krb5-common (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-core:
ubuntu-release-upgrader-core depends on python3:any; however:
Package python3 is not configured yet.
ubuntu-release-upgrader-core depends on python3-distupgrade (= 1:22.04.14); however:
Package python3-distupgrade is not configured yet.
dpkg: error processing package ubuntu-release-upgrader-core (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-shell:
gnome-shell depends on python3; however:
Package python3 is not configured yet.
dpkg: eNo apport report written because MaxReports is reached already
rror processing package gnome-shell (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sssd-krb5:
sssd-krb5 depends on sssd-common (= 2.6.3-1ubuntu3.2); however:
Package sssd-common is not configured yet.
sssd-krb5 depends on sssd-krb5-common (= 2.6.3-1ubuntu3.2); however:
Package sssd-krb5-common is not configured yet.
dpkg: error processing package sssd-krb5 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-gtk:
ubuntu-release-upgrader-gtk depends on python3:any; however:
Package python3 is not configured yet.
ubuntu-release-upgrader-gtk depends on ubuntu-release-upgrader-core (= 1:22.04.14); however:
Package ubuntu-release-upgrader-core is not configured yet.
ubuntu-release-upgrader-gtk depends on python3-distupgrade (= 1:22.04.14); however:
Package python3-distupgrade is not configured yet.
dpkg: error processing package ubuntu-reNo apport report written because MaxReports is reached already
lease-upgrader-gtk (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-advantage-tools:
ubuntu-advantage-tools depends on python3:any; however:
Package python3 is not configured yet.
dpkg: error processing package ubuntu-advantage-tools (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-uno:
python3-uno depends on python3:any; however:
Package python3 is not configured yet.
python3-uno depends on python3 (<< 3.11); however:
Package python3 is not configured yet.
python3-uno depends on python3 (>= 3.10~); however:
Package python3 is not configured yet.
dpkg: error processing package python3-uno (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of sssd:
sssd depends on python3-sss (= 2.6.3-1ubuntu3.2); however:
Package python3-sss is not configured yet.
sssd depends on sssd-common (= 2.6.3-1ubuntu3.2); however:
Package sssd-common is not configured yet.
sssd depends on sssd-ipa (= 2.6.3-1ubuntu3.2); however:
Package sssd-ipa is not configured yet.
sssd depends on sssd-krb5 (= 2.6.3-1ubuntu3.2); however:
Package sssd-krb5 is not configured yet.
sssd depends on sssd-proxy (= 2.6.3-1ubuntu3.2); however:
Package sssd-proxy is not configured yet.
dpkg: error processing package sssd (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python3-lib2to3:
python3-lib2to3 depends on python3:any (>= 3.10.5-0~); however:
Package python3 is not configured yet.
python3-lib2to3 depends on python3:any (<< 3.12); however:
Package python3 is not configured yet.
dpkg: error processing package python3-lib2to3 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of sssd-ldap:
sssd-ldap depends on sssd-common (= 2.6.3-1ubuntu3.2); however:
Package sssd-common is not configured yet.
sssd-ldap depends on sssd-krb5-common (= 2.6.3-1ubuntu3.2); however:
Package sssd-krb5-common is not configured yet.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
dpkg: error processing package sssd-ldap (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-mako:
python3-mako depends on python3:any; however:
Package python3 is not configured yet.
dpkg: error processing package python3-mako (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of sssd-ad:
sssd-ad depends on sssd-ad-common (= 2.6.3-1ubuntu3.2); however:
Package sssd-ad-common is not configured yet.
sssd-ad depends on sssd-common (= 2.6.3-1ubuntu3.2); however:
Package sssd-common is not configured yet.
sssd-ad depends on sssd-krb5-common (= 2.6.3-1ubuntu3.2); however:
Package sssd-krb5-common is not configured yet.
dpkg: error processing package sssd-ad (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-jwt:
python3-jwt depends on python3:any; however:
Package python3 is not configured yet.
dpkg: error processing package python3-jwt (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python3-speechd:
python3-speechd depends on python3:any; however:
Package python3 is not configured yet.
dpkg: error processing package python3-speechd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-gdbm:amd64:
python3-gdbm:amd64 depends on python3 (>= 3.10.5-0~); however:
Package python3 is not configured yet.
python3-gdbm:amd64 depends on python3 (<< 3.12); however:
Package python3 is not configured yet.
dpkg: error processing package python3-gdbm:amd64 (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of software-properties-gtk:
software-properties-gtk depends on python3; however:
Package python3 is not configured yet.
software-properties-gtk depends on python3-software-properties (= 0.99.22.3); however:
Package python3-software-properties is not configured yet.
software-properties-gtk depends on software-properties-common; however:
Package software-properties-common is not configured yet.
software-properties-gtk depends on python3:any; however:
Package python3 is not configured yet.
dpkg: error processing package software-properties-gtk (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent processing triggers for gnome-menus:
gnome-menus depends on python3:any; however:
Package python3 is not configured yet.
dpkg: error processing package gnome-menus (--configure):
dependency problems - leaving triggers unprocessed
No apport report written because MaxReports is reached already
Errors were encountered while processing:
python3
sssd-common
sssd-proxy
python3-distupgrade
python3-sss
software-properties-common
netplan.io
sssd-ipa
python3-oauthlib
python3-software-properties
sssd-ad-common
sssd-krb5-common
ubuntu-release-upgrader-core
gnome-shell
sssd-krb5
ubuntu-release-upgrader-gtk
ubuntu-advantage-tools
python3-uno
sssd
python3-lib2to3
sssd-ldap
python3-mako
sssd-ad
python3-jwt
python3-speechd
python3-gdbm:amd64
software-properties-gtk
gnome-menus
E: Sub-process /usr/bin/dpkg returned an error code (1)
ls /usr/share/ibus-table/
data icons setup tables
如果有人能帮助我解决这个错误,我将非常感激
答案1
当你把所有的绒毛都煮出来时,这是一个简单的丢失文件问题。
输出的关键行是:
E: py3compile:212: cannot create directory /usr/share/ibus-table/engine/__pycache__: FileNotFoundError(2, 'No such file or directory')
[Errno 2] No such file or directory: '/usr/share/ibus-table/engine/factory.py'error running python rtupdate hook ibus-table
那么让我们看看哪些包应该提供该文件:
$ dpkg -S /usr/share/ibus-table/engine
ibus-table: /usr/share/ibus-table/engine
重新安装该包ibus-table
应该可以安装缺少的文件。
sudo apt install --reinstall ibus-table