ubuntu Errors were encountered while processing: update-notifier-common

Posted in :

在 ubuntu 使用 apt upgrade 發生錯誤:

Setting up update-notifier-common (3.192.54.8) ...
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 status 1
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for rsyslog (8.2112.0-2ubuntu2.2) ...
Errors were encountered while processing:
 update-notifier-common
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

我的ubuntu 版本:

Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-105-generic x86_64)

解法:

cd /var/lib/dpkg
sudo mv info info.bak
sudo mkdir info


資料來源:
https://askubuntu.com/questions/1164103/broken-packages-update-notifier-update-managticer-that-disrupts-all-kind-of-i

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *