Problema com dependências python, não é possível remover nem instalar

0

Parece que não tenho o python instalado

$ python
The program 'python' can be found in the following packages:
 * python-minimal
 * python3
Try: sudo apt install <selected package>

Mas quando tento forçar a instalação, recebo este erro

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  python3-pyasn1
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  python-acme python-certbot python-chardet python-cryptography python-idna python-libxml2 python-openssl python-requests python-six python-urllib3
Suggested packages:
  python-acme-doc python-certbot-doc python-cryptography-doc python-cryptography-vectors python-openssl-doc python-openssl-dbg python-socks python-ntlm
The following packages will be upgraded:
  python-acme python-certbot python-chardet python-cryptography python-idna python-libxml2 python-openssl python-requests python-six python-urllib3
10 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
14 not fully installed or removed.
Need to get 0 B/18,4 MB of archives.
After this operation, 221 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 513434 files and directories currently installed.)
Preparing to unpack .../python-idna_2.5-1+ubuntu16.04.1+certbot+1_all.deb ...
/var/lib/dpkg/info/python-idna.prerm: 6: /var/lib/dpkg/info/python-idna.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-idna_2.5-1+ubuntu16.04.1+certbot+1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python-idna.postinst: 6: /var/lib/dpkg/info/python-idna.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python-six_1.11.0-1+ubuntu16.04.1+certbot+1_all.deb ...
/var/lib/dpkg/info/python-six.prerm: 6: /var/lib/dpkg/info/python-six.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-six_1.11.0-1+ubuntu16.04.1+certbot+1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python-six.postinst: 6: /var/lib/dpkg/info/python-six.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python-cryptography_1.9-1+ubuntu16.04.1+certbot+2_amd64.deb ...
/var/lib/dpkg/info/python-cryptography.prerm: 6: /var/lib/dpkg/info/python-cryptography.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-cryptography_1.9-1+ubuntu16.04.1+certbot+2_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python-cryptography.postinst: 6: /var/lib/dpkg/info/python-cryptography.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python-openssl_17.3.0-1~0+ubuntu16.04.1+certbot+1_all.deb ...
/var/lib/dpkg/info/python-openssl.prerm: 6: /var/lib/dpkg/info/python-openssl.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-openssl_17.3.0-1~0+ubuntu16.04.1+certbot+1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/python-openssl.postinst: 6: /var/lib/dpkg/info/python-openssl.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python-chardet_3.0.4-1+ubuntu16.04.1+certbot+2_all.deb ...
/var/lib/dpkg/info/python-chardet.prerm: 6: /var/lib/dpkg/info/python-chardet.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-chardet_3.0.4-1+ubuntu16.04.1+certbot+2_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/python-chardet.postinst: 6: /var/lib/dpkg/info/python-chardet.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python-requests_2.18.1-1+ubuntu16.04.1+certbot+1_all.deb ...
/var/lib/dpkg/info/python-requests.prerm: 6: /var/lib/dpkg/info/python-requests.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-requests_2.18.1-1+ubuntu16.04.1+certbot+1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/python-requests.postinst: 6: /var/lib/dpkg/info/python-requests.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python-urllib3_1.21.1-1+ubuntu16.04.1+certbot+1_all.deb ...
/var/lib/dpkg/info/python-urllib3.prerm: 6: /var/lib/dpkg/info/python-urllib3.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-urllib3_1.21.1-1+ubuntu16.04.1+certbot+1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/python-urllib3.postinst: 6: /var/lib/dpkg/info/python-urllib3.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python-certbot_0.19.0-1+ubuntu16.04.1+certbot+1_all.deb ...
/var/lib/dpkg/info/python-certbot.prerm: 6: /var/lib/dpkg/info/python-certbot.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-certbot_0.19.0-1+ubuntu16.04.1+certbot+1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/python-certbot.postinst: 6: /var/lib/dpkg/info/python-certbot.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python-acme_0.19.0-1+ubuntu16.04.1+certbot+1_all.deb ...
/var/lib/dpkg/info/python-acme.prerm: 6: /var/lib/dpkg/info/python-acme.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-acme_0.19.0-1+ubuntu16.04.1+certbot+1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/python-acme.postinst: 6: /var/lib/dpkg/info/python-acme.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python-libxml2_2.9.3+dfsg1-1ubuntu0.3_amd64.deb ...
/var/lib/dpkg/info/python-libxml2.prerm: 6: /var/lib/dpkg/info/python-libxml2.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/python-libxml2_2.9.3+dfsg1-1ubuntu0.3_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/python-libxml2.postinst: 6: /var/lib/dpkg/info/python-libxml2.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/python-idna_2.5-1+ubuntu16.04.1+certbot+1_all.deb
 /var/cache/apt/archives/python-six_1.11.0-1+ubuntu16.04.1+certbot+1_all.deb
 /var/cache/apt/archives/python-cryptography_1.9-1+ubuntu16.04.1+certbot+2_amd64.deb
 /var/cache/apt/archives/python-openssl_17.3.0-1~0+ubuntu16.04.1+certbot+1_all.deb
 /var/cache/apt/archives/python-chardet_3.0.4-1+ubuntu16.04.1+certbot+2_all.deb
 /var/cache/apt/archives/python-requests_2.18.1-1+ubuntu16.04.1+certbot+1_all.deb
 /var/cache/apt/archives/python-urllib3_1.21.1-1+ubuntu16.04.1+certbot+1_all.deb
 /var/cache/apt/archives/python-certbot_0.19.0-1+ubuntu16.04.1+certbot+1_all.deb
 /var/cache/apt/archives/python-acme_0.19.0-1+ubuntu16.04.1+certbot+1_all.deb
 /var/cache/apt/archives/python-libxml2_2.9.3+dfsg1-1ubuntu0.3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Quando eu tento remover eu recebo essas mensagens ohter

$ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 certbot : Depends: python-certbot (= 0.19.0-1+ubuntu16.04.1+certbot+1) but 0.17.0-2+ubuntu16.04.1+certbot+1 is installed
E: Unmet dependencies. Try using -f.
    
por Joe 02.11.2017 / 19:43

0 respostas