Ubuntu 子进程/usr/bin/dpkg返回了一个错误代码(1),原因是更新通知程序公用

Ubuntu 子进程/usr/bin/dpkg返回了一个错误代码(1),原因是更新通知程序公用,ubuntu,ubuntu-16.04,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) ro

在运行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)
更新initramfs:Generating/boot/initrd.img-4.4.0-135-generic
处理时遇到错误:
更新通知程序公用
更新通知程序
E:子流程/usr/bin/dpkg返回错误代码(1)
root@demo:~#apt安装nano
正在阅读软件包列表。。。多恩
构建依赖树
正在读取状态信息。。。多恩
nano已经是最新版本(2.5.3-2ubuntu2)。
nano设置为手动安装。
0已升级,0已新安装,0已删除,0未升级。
2未完全安装或拆除。
执行此操作后,将使用0 B的额外磁盘空间。
你想继续吗?[Y/n]Y
正在设置更新通知程序公用程序(3.168.9)。。。
回溯(最近一次呼叫最后一次):
文件“/usr/lib/update notifier/package data downloader”,第24行,在
导入debian.deb822
文件“/usr/lib/python3/dist-packages/debian/deb822.py”,第47行,在
进口六
ImportError:没有名为“six”的模块
dpkg:处理包更新通知程序公用(--configure)时出错:
安装的子进程安装后脚本返回错误退出状态1
dpkg:依赖关系问题阻止配置更新通知程序:
更新通知程序依赖于更新通知程序公用(=3.168.9);然而:
尚未配置包更新通知程序公用程序。
dpkg:处理包更新通知程序时出错(--configure):
依赖关系问题-保持未配置状态
未写入apport报告,因为错误消息表明它是以前失败的后续错误。
处理时遇到错误:
更新通知程序公用
更新通知程序
E:子流程/usr/bin/dpkg返回错误代码(1)

请帮助我,我今天遇到了同样的问题。在堆栈溢出站点上进行多次搜索后,未找到所需的解决方案。然而,我在一个中文网站上搜索后找到了一个解决方案,以下是解决方案:

cd /var/lib/dpkg
sudo mv info info.bak
sudo mkdir info
sudo apt-get upgrade
参考号