无法更新 update-notifier,ModuleNotFoundError:没有名为“debian”的模块

无法更新 update-notifier,ModuleNotFoundError:没有名为“debian”的模块

我正在尝试更新 update-notifier 和 update-notifier-common,但却收到此错误消息。我应该怎么做才能修复损坏的更新?

Setting up update-notifier-common (3.192.40.4) ...
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 24, in <module>
    import debian.deb822
ModuleNotFoundError: No module named 'debian'
dpkg: error processing package update-notifier-common (--configure):
 installed update-notifier-common package post-installation script subprocess returned error exit st
atus 1
dpkg: dependency problems prevent configuration of update-notifier:
 update-notifier depends on update-notifier-common (= 3.192.40.4); however:
  Package update-notifier-common is not configured yet.

dpkg: error processing package update-notifier (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libglib2.0-0:amd64 (2.68.1-1~ubuntu21.04.1) ...
No apport report written because the error message indicates its a followup error from a previous fa
ilure.
      Override for key “direction” in schema “org.xfce.mousepad.state.search” in override file “/usr
/share/glib-2.0/schemas/20_xubuntu-default-settings.gschema.override” is outside the range given in 
the schema; ignoring override for this key.
Processing triggers for libglib2.0-0:i386 (2.68.1-1~ubuntu21.04.1) ...
Override for key “direction” in schema “org.xfce.mousepad.state.search” in override file “/usr/share
/glib-2.0/schemas/20_xubuntu-default-settings.gschema.override” is outside the range given in the sc
hema; ignoring override for this key.
Processing triggers for hicolor-icon-theme (0.17-2) ...
Errors were encountered while processing:
 update-notifier-common
 update-notifier
E: Sub-process /usr/bin/dpkg returned an error code (1)

8 年前有人说要重新安装 python-debian,但 apt 说包不可用。我担心安装 python 时做错了,因为修复起来似乎很麻烦。

如果这相关的话,我在使用 Xubuntu 21.04。

答案1

你必须跑

sudo apt-get update
sudo apt-get install --reinstall python3-debian

然后使用以下命令安装所有升级

sudo apt-get --fix-broken install
sudo apt-get dist-upgrade

相关内容