Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

While running apt upgrade command, i am getting.

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)

Please help

I encountered the same problem today. After a number of searches on the Stack Overflow site, no desired solution was found. However, I found a solution after searching on a Chinese website, and below are the solution:

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

Ref here

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.