0

I can't remove or update python on debian Stretch

/var/lib/dpkg/info/python-dnspython.postinst: 6: /var/lib/dpkg/info/python-dnspython.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-dnspython (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
python-idna (2.2-1) wird eingerichtet ...
/var/lib/dpkg/info/python-idna.postinst: 6: /var/lib/dpkg/info/python-idna.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-idna (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
python-parsedatetime (2.1-3) wird eingerichtet ...
/var/lib/dpkg/info/python-parsedatetime.postinst: 6: /var/lib/dpkg/info/python-parsedatetime.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-parsedatetime (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
python-pyasn1 (0.1.9-2) wird eingerichtet ...
/var/lib/dpkg/info/python-pyasn1.postinst: 6: /var/lib/dpkg/info/python-pyasn1.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-pyasn1 (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
python-tz (2016.7-0.3) wird eingerichtet ...
/var/lib/dpkg/info/python-tz.postinst: 6: /var/lib/dpkg/info/python-tz.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-tz (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
python-pkg-resources (33.1.1-1) wird eingerichtet ...
/var/lib/dpkg/info/python-pkg-resources.postinst: 6: /var/lib/dpkg/info/python-pkg-resources.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-pkg-resources (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
python-configargparse (0.11.0-1) wird eingerichtet ...
/var/lib/dpkg/info/python-configargparse.postinst: 6: /var/lib/dpkg/info/python-configargparse.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-configargparse (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
python-six (1.10.0-3) wird eingerichtet ...
/var/lib/dpkg/info/python-six.postinst: 6: /var/lib/dpkg/info/python-six.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-six (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
python-psutil (5.0.1-1) wird eingerichtet ...
/var/lib/dpkg/info/python-psutil.postinst: 6: /var/lib/dpkg/info/python-psutil.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-psutil (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
python-enum34 (1.1.6-1) wird eingerichtet ...
/var/lib/dpkg/info/python-enum34.postinst: 6: /var/lib/dpkg/info/python-enum34.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-enum34 (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
python-funcsigs (1.0.2-3) wird eingerichtet ...
/var/lib/dpkg/info/python-funcsigs.postinst: 6: /var/lib/dpkg/info/python-funcsigs.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-funcsigs (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
python-ipaddress (1.0.17-1) wird eingerichtet ...
/var/lib/dpkg/info/python-ipaddress.postinst: 6: /var/lib/dpkg/info/python-ipaddress.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-ipaddress (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
python-pyicu (2.2-1+b1) wird eingerichtet ...
/var/lib/dpkg/info/python-pyicu.postinst: 6: /var/lib/dpkg/info/python-pyicu.postinst: pycompile: not found
dpkg: Fehler beim Bearbeiten des Paketes python-pyicu (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 127 zurück
Fehler traten auf beim Bearbeiten von:
 python-dnspython
 python-idna
 python-parsedatetime
 python-pyasn1
 python-tz
 python-pkg-resources
 python-configargparse
 python-six
 python-psutil
 python-enum34
 python-funcsigs
 python-ipaddress
 python-pyicu
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have try:

apt --fix-broken install
apt-get purge python3
apt-get -f install
apt-get update && apt-get dist-upgrade && apt-get autoremove

I get allways the same error. How can i fix it?

EDIT1: Symlink:

lrwxrwxrwx 1 root root           9 Jan 24  2017 python2 -> python2.7
-rwxr-xr-x 1 root root     3779512 Sep 26 20:42 python2.7
lrwxrwxrwx 1 root root           9 Nov 21 13:04 python3 -> python3.7
-rwxr-xr-x 2 root root     4751184 Sep 27 18:03 python3.5
-rwxr-xr-x 2 root root     4751184 Sep 27 18:03 python3.5m
-rwxr-xr-x 2 root root     4534616 Okt 21 10:08 python3.6
-rwxr-xr-x 2 root root     4534616 Okt 21 10:08 python3.6m
-rwxr-xr-x 2 root root     4865504 Okt 21 10:03 python3.7
-rwxr-xr-x 2 root root     4865504 Okt 21 10:03 python3.7m
lrwxrwxrwx 1 root root          10 Nov 21 13:04 python3m -> python3.7m

SOLVED:

sudo apt-get -m --reinstall install python python-minimal dh-python
sudo apt-get -f install

1 Answer 1

0

Check your symlink /usr/bin/python. This needs to be pointing to python2.7, not python3.

4
  • Thank you. I have edit my symlink in the first post
    – Koda
    Nov 22, 2018 at 14:57
  • So what does /etc/alternatives/python point to? Nov 22, 2018 at 14:58
  • I have remove the alternatives (see edit in the first post).
    – Koda
    Nov 22, 2018 at 15:02
  • I have edited the first post with the complete error and the symlink. I hope you have a idea to solve the problem.
    – Koda
    Nov 22, 2018 at 15:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .