1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] E: Sub-process /usr/bin/dpkg returned an error code (1) - Kali -

Discussão em 'Python' iniciado por Stack, Setembro 14, 2024.

  1. Stack

    Stack Membro Participativo

    I made a mistake by trying to downgrade python for some reason, so I removed/uninstalled the current python version and ended up with a broken system. Almost 5 days searching around for help, unfortunately nothing helped so far, even similar errors probably fixed differently than my issue here! I decided to open a new post for my case seeking help.

    However, When I tried to upgrade/install it ends up same way which is:
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    Here are python versions running in the system "worked fine", I can use it without any problems, the only case was when I tried to upgrade and/or installing anything.


    $ python --version
    Python 2.7

    $ python
    Completing external command
    python python2 python2.7-config python3-config python3.11-config python3.12-config
    python-config python2.7 python3 python3.11 python3.12


    $ sudo apt-get update
    Hit:1 https://packages.microsoft.com/repos/code stable InRelease
    Hit:2 http://http.kali.org/kali kali-rolling InRelease
    Hit:3 https://repo.protonvpn.com/debian stable InRelease
    Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease
    Reading package lists... Done

    $ sudo apt-get upgrade
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Calculating upgrade... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    16 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 python3 (3.11.8-1) ...
    running python rtupdate hooks for python3.11...
    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 bleachbit
    error running python rtupdate hook bleachbit
    Traceback (most recent call last):
    File "/usr/bin/py3clean", line 210, in <module>

    # removed due - This looks like spam. -

    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 xfce4-panel-profiles
    error running python rtupdate hook xfce4-panel-profiles
    dpkg: error processing package python3 (--configure):
    installed python3 package post-installation script subprocess returned error exit status 4
    dpkg: dependency problems prevent configuration of python3-wheel:
    python3-wheel depends on python3:any; however:
    Package python3 is not configured yet.

    dpkg: error processing package python3-wheel (--configure):
    dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of llvm-16-tools:
    llvm-16-tools depends on python3; however:
    Package python3 is not configured yet.

    dpkg: error processing package llvm-16-tools (--configure):
    dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of python3-pygments:
    python3-pygments depends on python3:any; however:
    Package python3 is not configured yet.

    # removed due - This looks like spam. -

    dpkg: error processing package python3-openssl (--configure):
    dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of python3-yaml:
    python3-yaml depends on python3 (<< 3.13); however:
    Package python3 is not configured yet.
    python3-yaml depends on python3 (>= 3.11~); however:
    Package python3 is not configured yet.
    python3-yaml depends on python3:any; however:
    Package python3 is not configured yet.

    dpkg: error processing package python3-yaml (--configure):
    dependency problems - leaving unconfigured
    Errors were encountered while processing:
    python3
    python3-wheel
    llvm-16-tools
    python3-pygments
    python3-cryptography
    python3-dev
    python3-gi
    libwacom-bin
    python3-lib2to3
    python-is-python3
    python3-cffi-backend:amd64
    python3-pkg-resources
    python3-distutils
    llvm-16-dev
    python3-openssl
    python3-yaml
    E: Sub-process /usr/bin/dpkg returned an error code (1)


    I tried every possible way to fix the issue, it seems that I removed/uninstalled something in /usr/bin/dpkg but I am not quite sure, so here are more details that will probably help you sort out the error.


    $ sudo dpkg --configure -a
    #or
    $ sudo apt --fix-broken install

    # - End up same result above -

    Continue reading...

Compartilhe esta Página