GNU/Linux >> Linux Esercitazione >  >> Ubuntu

Eliminato accidentalmente /usr/bin/python3.5, non è possibile reinstallare?

Sistema operativo:Ubuntu 14.04

Ho visto una domanda simile, ma nessuno dei metodi menzionati funziona.

Ho installato Python 3.5 eseguendo:

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

Faccio un errore eseguendo ln -sf /usr/bin/python /usr/bin/python3.5 , quindi il collegamento simbolico a python3.5 diventa python2.7 .

Ho provato:

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 entrambi i casi ho ottenuto qualcosa come:

/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)

Risposta accettata:

Ho risolto.

Trova tutte le dipendenze:

dpkg -l | grep python3.5

Rimuovili tutti:

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

Reinstalla

apt-get install python3.5-dev

Ubuntu
  1. In che modo Linux gestisce più separatori di percorsi consecutivi (/home////nomeutente///file)?

  2. Perché /bin/sh punta a /bin/dash e non a /bin/bash??

  3. /usr/bin/ld:impossibile trovare -lpython2.7

  4. autorizzazione negata per il compositore in /usr/local/bin/

  5. Come fare in modo che il comando python3 esegua Python 3.6 anziché 3.5?

Node.js Conflitti:/sbin/node Vs /usr/bin/node?

Directory /usr eliminata accidentalmente?

Icone cancellate accidentalmente in /usr/share, come recuperarle?

Installa i binari in /bin, /sbin, /usr/bin e /usr/sbin, interazioni con --prefix e DESTDIR

Qual è la differenza tra #!/usr/bin/env bash e #!/usr/bin/bash?

cmake --version punta a /usr/bin/cmake mentre which cmake punta a /usr/local/bin