ubuntu - 子进程/usr/bin/dpkg 由于 update-notifier-common 返回错误代码 (1)

标签 ubuntu ubuntu-16.04

在运行 apt upgrade 命令时,我得到了。

update-initramfs: Generating /boot/initrd.img-4.4.0-135-generic
    Errors were encountered while processing:
     update-notifier-common
     update-notifier
    E: Sub-process /usr/bin/dpkg returned an error code (1)


root@demo:~# apt install nano
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nano is already the newest version (2.5.3-2ubuntu2).
nano set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 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 update-notifier-common (3.168.9) ...
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 24, in <module>
    import debian.deb822
  File "/usr/lib/python3/dist-packages/debian/deb822.py", line 47, in <module>
    import six
ImportError: No module named 'six'
dpkg: error processing package update-notifier-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of update-notifier:
 update-notifier depends on update-notifier-common (= 3.168.9); however:
  Package update-notifier-common is not configured yet.

dpkg: error processing package update-notifier (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 update-notifier-common
 update-notifier
E: Sub-process /usr/bin/dpkg returned an error code (1)

请帮忙

最佳答案

我今天遇到了同样的问题。在 Stack Overflow 网站上进行了多次搜索后,没有找到所需的解决方案。但是,我在一个中文网站上搜索后找到了解决方案,以下是解决方案:

cd /var/lib/dpkg
sudo mv info info.bak
sudo mkdir info
sudo apt-get upgrade
引用 here

关于ubuntu - 子进程/usr/bin/dpkg 由于 update-notifier-common 返回错误代码 (1),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52543627/

相关文章:

emacs - 在 -nw 模式下,emacs 中的 windows 键

ubuntu - Ubuntu : Active: inactive (dead) (Result: exit-code) 上的 Realm 对象服务器

node.js - 如何卸载无服务器? "npm uninstall -g serverless"不工作

phalcon - PHP fatal error : Class 'jsonserializable' not found in Unknown on line 0

mysql - 当导入到典型的 Ubuntu 本地主机时,没有 InnoDB 的 MySQL 数据库可以工作吗?

shell - UNIX:复制整个目录结构并且只复制特定的文件类型

linux - 在 Rundeck 作业中从 root 切换用户(无法创建 session : Already running in a session)

Ubuntu 16.04 | Upstart 在启动后立即杀死我的进程

java - 为 IntelliJ 项目设置 java SDK

ubuntu - 如何停止自建的kubernetes集群