GNU/Linux >> Tutoriales Linux >  >> Ubuntu

/usr/bin/python3.5 eliminado accidentalmente, ¿no se puede reinstalar?

SO:Ubuntu 14.04

He visto una pregunta similar, pero ninguno de los métodos mencionados allí funciona.

Instalé python 3.5 ejecutando:

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

Cometí un error al ejecutar ln -sf /usr/bin/python /usr/bin/python3.5 , por lo que el enlace simbólico a python3.5 convertirse en python2.7 .

He probado:

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

En ambos casos obtuve algo como:

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

Respuesta aceptada:

Lo arreglé.

Encuentra todas las dependencias:

dpkg -l | grep python3.5

Eliminarlos todos:

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

Reinstalar

apt-get install python3.5-dev

Ubuntu
  1. /usr/bin Vs /usr/local/bin ¿En Linux?

  2. /usr/bin/ls:/usr/bin/ls:¿No se puede ejecutar el archivo binario?

  3. ¿Por qué /bin/sh apunta a /bin/dash y no a /bin/bash?

  4. ¿Terminal no se abre después de actualizar Python a 3.7?

  5. Conflictos de Node.js:/sbin/node Vs /usr/bin/node?

¿Cómo maneja Linux múltiples separadores de rutas consecutivas (/home////username///file)?

Linux – ¿Fusionar /usr/bin y /usr/sbin en /bin (gnu/linux)?

Iconos eliminados accidentalmente en /usr/share, ¿cómo recuperarlos?

/usr/bin/ld:no se puede encontrar -lpython2.7

¿Cómo hacer que el comando python3 ejecute Python 3.6 en lugar de 3.5?

¿Cuáles son los significados de /usr/sbin, /usr/local/sbin y /usr/local/bin?