1

Execution python3 I get a "Segmentation fault" error.

How can I reinstall python3 by hand without apt, apt-get etc because apt needs python3! dpkg --configure -a returned ok

Can I find all python package in a tar?

python = python3.7.3

Linux pi-hole 5.4.72+ #1356 Thu Oct 22 13:56:00 BST 2020 armv6l GNU/Linux
(rpi0w buster)



# dpkg -i python3.7_3.7.3-2+deb10u2_armhf.deb
(Reading database ... 41433 files and directories currently installed.)
Preparing to unpack python3.7_3.7.3-2+deb10u2_armhf.deb ...
Unpacking python3.7 (3.7.3-2+deb10u2) over (3.7.3-2+deb10u2) ...
Setting up python3.7 (3.7.3-2+deb10u2) ...
Segmentation fault
dpkg: error processing package python3.7 (--install):
installed python3.7 package post-installation script subprocess returned error exit status 139
Processing triggers for mime-support (3.62) ...
Processing triggers for man-db (2.8.5-2) ...
Errors were encountered while processing:
python3.7
4
  • You could look to download the source and recompile. Source is available from python.org
    – user115418
    Nov 30 '20 at 20:57
  • 1
    That's a painful process for a rpi0 (I've already tried to)
    – konenas
    Dec 1 '20 at 1:46
  • apt-get also needs python3?
    – Ingo
    Dec 1 '20 at 18:29
  • @Ingo yes, apt, apt-get depends on apt-listchanges which depends on python3
    – konenas
    Dec 1 '20 at 19:27
1

Assuming you're using Raspbian, download the Python 3 packages manually and reinstall them with dpkg -p package/dpkg -i package. I would start by reinstalling python3.7-minimal and libpython3.7-minimal.

Edit: since dpkg has failed too, I'm inclined to say the best option is to reinstall the system. You might spend hours hunting the issued down, and you will never be sure it's completely gone: I see no reason to believe that the damage is limited to Python or the package manager.

If you have reasons to think otherwise, the next repair step would be to get a working Debian-multiarch system, install python3.7-minimal:armhf on it, then manually copy the binary files on the SD card. Or flash a spare SD card with Raspbian, mount it and, again, copy the files you need.

6
  • Can't do it. dpkg depends on python3!!!
    – konenas
    Dec 1 '20 at 16:13
  • @konenas what is the error message if you try it?
    – Ingo
    Dec 1 '20 at 18:30
  • Segmentation fault
    – konenas
    Dec 1 '20 at 19:23
  • @konenas dpkg is not a python3 script. This can be caused by other issues. What make you think that's from python3?
    – Ingo
    Dec 1 '20 at 19:59
  • the first line: #!/usr/bin/python3 of apt-listchanges
    – konenas
    Dec 1 '20 at 20:33

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.