[Python] Kali Linux APT error: APT fails because of pyinstaller-hooks-contrib

Discussão em 'Python' iniciado por Stack, Setembro 4, 2025.

  1. Stack

    Stack Membro Participativo

    I just installed Kali Linux on my laptop, tried to apt update and then apt upgrade, but encountered an issue during the upgrade process. Now, apt seems broken and I cannot seem to install any packages. If I try to install a package, I get:

    You might want to run 'apt --fix-broken install' to correct these.
    Unsatisfied dependencies:
    python3-pyinstaller : Depends: pyinstaller-hooks-contrib but it is not going to be installed
    Error: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
    Error: The following information from --solver 3.0 may provide additional context:
    Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).



    If I then try to run the requested command, I get:

    └─# apt --fix-broken install
    Correcting dependencies... Done
    The following packages were automatically installed and are no longer required:
    libgdal36 libgdata22 libhdf4-0-alt libqt5ct-common1.8 libsigsegv2 libsoup2.4-common libvpx9 python3-pyinstaller-hooks-contrib
    libgdata-common libgeos3.13.1 libogdi4.1 libsframe1 libsoup-2.4-1 libtheora0 python3-packaging-whl python3-wheel-whl
    Use 'sudo apt autoremove' to remove them.

    Installing dependencies:
    pyinstaller-hooks-contrib

    Summary:
    Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 0
    160 not fully installed or removed.
    Download size: 0 B / 118 kB
    Space needed: 953 kB / 96.4 GB available

    Continue? [Y/n] y
    (Reading database ... 429063 files and directories currently installed.)
    Preparing to unpack .../pyinstaller-hooks-contrib_2025.8-1_all.deb ...
    Unpacking pyinstaller-hooks-contrib (2025.8-1) ...
    dpkg: error processing archive /var/cache/apt/archives/pyinstaller-hooks-contrib_2025.8-1_all.deb (--unpack):
    trying to overwrite '/usr/lib/python3/dist-packages/_pyinstaller_hooks_contrib/__init__.py', which is also in package python3-pyinstaller-hooks-contrib (2025.1-0kali1)
    Errors were encountered while processing:
    /var/cache/apt/archives/pyinstaller-hooks-contrib_2025.8-1_all.deb
    Error: Sub-process /usr/bin/dpkg returned an error code (1)


    Thanks for any help regarding this.

    Continue reading...

Compartilhe esta Página