1

I keep on getting this error when I try to install or upgrades and almost every thing.

After this operation, 731 kB disk space will be freed.
Do you want to continue? [Y/n] y
/bin/sh: 1: /usr/bin/apt-listchanges: not found
E: Sub-process /usr/bin/apt-listchanges --apt || test $? -lt 10 returned an error code (1)
E: Failure running script /usr/bin/apt-listchanges --apt || test $? -lt 10

Output for cat /etc/apt/apt.conf.d/20listchanges:

DPkg::Pre-Install-Pkgs { "/usr/bin/apt-listchanges --apt || test $? -lt 10"; };

DPkg::Tools::Options::/usr/bin/apt-listchanges::Version "2";

Output for sudo apt update && sudo apt upgrade:

    Errors were encountered while processing:

     python3

     python3-crypto

     lsb-release

    E: Sub-process /usr/bin/dpkg returned an error code (

output for sudo apt update --fix-missing && sudo apt install -f

Hit:2 http://ftp.de.debian.org/debian sid InRelease

Hit:1 http://kali.download/kali kali-rolling InRelease

Hit:3 http://kali.download/kali kali-bleeding-edge InRelease

Reading package lists... Done

Building dependency tree       

Reading state information... Done

2 packages can be upgraded. Run 'apt list --upgradable' to see them.

Reading package lists... Done

Building dependency tree       

Reading state information... Done

0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

1 not fully installed or removed.

After this operation, 0 B of additional disk space will be used.

Setting up python3 (3.7.3-1) ...

running python rtupdate hooks for python3.7...

dpkg-query: package 'apt-listchanges' is not installed

Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.

Traceback (most recent call last):

  File "/usr/bin/py3clean", line 210, in <module>

    main()

  File "/usr/bin/py3clean", line 196, in main

    pfiles = set(dpf.from_package(options.package))

  File "/usr/share/python3/debpython/files.py", line 53, in from_package

    raise Exception("cannot get content of %s" % package_name)

Exception: cannot get content of apt-listchanges


error running python rtupdate hook apt-listchanges

dpkg-query: package 'backdoor-factory' is not installed

Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.

Traceback (most recent call last):

  File "/usr/bin/py3clean", line 210, in <module>

    main()

  File "/usr/bin/py3clean", line 196, in main

    pfiles = set(dpf.from_package(options.package))

  File "/usr/share/python3/debpython/files.py", line 53, in from_package

    raise Exception("cannot get content of %s" % package_name)

Exception: cannot get content of backdoor-factory

error running python rtupdate hook backdoor-factory

dpkg-query: package 'dh-python' is not installed

Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.

Traceback (most recent call last):

  File "/usr/bin/py3clean", line 210, in <module>

    main()

  File "/usr/bin/py3clean", line 196, in main

    pfiles = set(dpf.from_package(options.package))

  File "/usr/share/python3/debpython/files.py", line 53, in from_package

    raise Exception("cannot get content of %s" % package_name)

Exception: cannot get content of dh-python

error running python rtupdate hook dh-python

dpkg-query: package 'gedit' is not installed

Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.

Traceback (most recent call last):

  File "/usr/bin/py3clean", line 210, in <module>

    main()

  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))

  File "/usr/share/python3/debpython/files.py", line 53, in from_package

    raise Exception("cannot get content of %s" % package_name)

Exception: cannot get content of gedit

error running python rtupdate hook gedit

dpkg-query: package 'system-config-printer-common' is not installed

Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.

Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>

    main()

  File "/usr/bin/py3clean", line 196, in main

    pfiles = set(dpf.from_package(options.package))

  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of system-config-printer-common

error running python rtupdate hook system-config-printer-common
dpkg-query: package 'terminator' is not installed

Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.

Traceback (most recent call last):

  File "/usr/bin/py3clean", line 210, in <module>
    main()

  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))

  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)

Exception: cannot get content of terminator

error running python rtupdate hook terminator

dpkg-query: package 'veil' is not installed

Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.

Traceback (most recent call last):

  File "/usr/bin/py3clean", line 210, in <module>
    main()

  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))

  File "/usr/share/python3/debpython/files.py", line 53, in from_package

    raise Exception("cannot get content of %s" % package_name)

Exception: cannot get content of veil

error running python rtupdate hook veil

dpkg-query: package 'virtualbox' is not installed

Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.

Traceback (most recent call last):
  File "/usr/bin/py3clean", line 210, in <module>
    main()
  File "/usr/bin/py3clean", line 196, in main
    pfiles = set(dpf.from_package(options.package))
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)

Exception: cannot get content of virtualbox

error running python rtupdate hook virtualbox
dpkg: error processing package python3 (--configure):

 installed python3 package post-installation script subprocess returned error 
exit status 4

Errors were encountered while processing:
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)
  • Please run ls /etc/apt/apt.conf.d/ | grep listchanges and add the output – Raffa Aug 16 at 0:07
  • the output is 20listchanges – Kura Catalony Aug 16 at 0:09
  • Please run cat /etc/apt/apt.conf.d/20listchanges and add the output to your question by editing it: askubuntu.com/posts/1166037/edit – Raffa Aug 16 at 0:11
  • done .. what next :( – Kura Catalony Aug 16 at 0:16
  • Please try option # 3 – Raffa Aug 16 at 0:49
0

Option # 1:

Please try:

sudo apt purge -f apt-listchanges

Then try:

sudo apt install -f apt-listchanges

Option # 2:

Please try:

sudo dpkg --remove apt-listchanges

Then try:

sudo apt install -f apt-listchanges

Option # 3:

Please try:

sudo mv /etc/apt/apt.conf.d/20listchanges /etc/apt/apt.conf.d/20listchanges.bak

Then try:

sudo apt update && sudo apt upgrade
  • i tried both options , it still giving me the same error – Kura Catalony Aug 15 at 23:59
  • @KuraCatalony I updated the answer with a third option. Please try it and let me know if apt works again. – Raffa Aug 16 at 1:11
  • it worked perfectly but in the last step i got this error : Errors were encountered while processing: python3 python3-crypto lsb-release E: Sub-process /usr/bin/dpkg returned an error code (1) – Kura Catalony Aug 16 at 11:09
  • @KuraCatalony Please try sudo dpkg --configure -a then try sudo apt update –fix-missing then try sudo apt install -f . If still not updating, please try this askubuntu.com/a/1164505/968501 – Raffa Aug 16 at 21:47
  • i tried those options too.. and i posted the result above please check it out ! – Kura Catalony Aug 16 at 22:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.