GNU/Linux >> LINUX-Kenntnisse >  >> Ubuntu

/usr/bin/python3.5 versehentlich gelöscht, Neuinstallation nicht möglich?

Betriebssystem:Ubuntu 14.04

Ich habe eine ähnliche Frage gesehen, aber keine der dort genannten Methoden funktioniert.

Ich habe Python 3.5 installiert, indem ich Folgendes ausgeführt habe:

apt-get install -y software-properties-common && \
add-apt-repository ppa:fkrull/deadsnakes && \
apt-get update
apt-get install -y python3.5 python3.5-dev

Ich mache einen Fehler, indem ich ln -sf /usr/bin/python /usr/bin/python3.5 ausführe , also der symbolische Link zu python3.5 zu python2.7 werden .

Ich habe versucht:

1.

rm -f /etc/apt/sources.list.d/*
dpkg --configure -a
add-apt-repository ppa:fkrull/deadsnakes
apt-get update
apt-get install --reinstall python3.5 python3.5-dev

2.

apt-get remove --purge python3.5 python3.5-dev
apt-get install python3.5 python3.5-dev

In beiden Fällen bekam ich so etwas wie:

/var/lib/dpkg/info/python3.5.postinst: 9: /var/lib/dpkg/info/python3.5.postinst: python3.5: not found
dpkg: error processing package python3.5 (--configure):
 subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of python3.5-dev:
 python3.5-dev depends on python3.5 (= 3.5.2-1~trusty1); however:
  Package python3.5 is not configured yet.

dpkg: error processing package python3.5-dev (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.5
 python3.5-dev
E: Sub-process /usr/bin/dpkg returned an error code (1)

Akzeptierte Antwort:

Ich habe es behoben.

Alle Abhängigkeiten finden:

dpkg -l | grep python3.5

Alle entfernen:

apt-get --purge remove libpython3.5 libpython3.5-dev libpython3.5-minimal libpython3.5-stdlib python3.5 python3.5-dev python3.5-minimal

Neu installieren

apt-get install python3.5-dev

Ubuntu
  1. /usr/bin vs. /usr/local/bin Unter Linux?

  2. /usr/bin/ls:/usr/bin/ls:Binärdatei kann nicht ausgeführt werden?

  3. Warum zeigt /bin/sh auf /bin/dash und nicht auf /bin/bash?

  4. Terminal öffnet sich nach dem Upgrade von Python auf 3.7 nicht?

  5. Node.js-Konflikte:/sbin/node Vs /usr/bin/node?

Wie behandelt Linux mehrere aufeinanderfolgende Pfadtrennzeichen (/home////username///file)?

Linux – Zusammenführen von /usr/bin und /usr/sbin in /bin (gnu/linux)?

Versehentlich gelöschte Symbole in /usr/share, wie bekomme ich sie zurück?

Was ist der Unterschied zwischen #!/usr/bin/env bash und #!/usr/bin/bash?

cmake --version zeigt auf /usr/bin/cmake, während cmake auf /usr/local/bin zeigt

Unterschied zwischen /bin und /usr/bin