Excluído acidentalmente /usr/bin/python3.5, não é possível reinstalar

1

SO: Ubuntu 14.04

Eu vi uma pergunta semelhante , mas nenhum dos métodos mencionados há trabalho.

Eu instalei o python 3.5 executando:

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

Eu cometi um erro executando ln -sf /usr/bin/python /usr/bin/python3.5 , então o link simbólico para python3.5 se tornou python2.7 .

Eu tentei:

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

Em ambos os casos, recebi 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)
    
por Mithril 10.02.2017 / 09:30

1 resposta

-1

Eu consertei.

Encontre todas as dependências:

dpkg -l | grep python3.5

Remova todos eles:

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
    
por Mithril 13.02.2017 / 02:54