Espero estar aqui, alguns dias atrás, o apt-get quebrou meu Raspberry Pi Model B rev. 2 (executando Openhabian). Ainda não sei por que e não consegui consertar sozinho.
Quando tento apt-get update
como root, obtenho a seguinte saída:
[15:58:05] root@openHABianPi:/home/openhabian# apt-get update
Reading package lists... Done
E: Method http has died unexpectedly!
E: Sub-process http received signal 4.
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method https has died unexpectedly!
E: Sub-process https received signal 4.
E: Method /usr/lib/apt/methods/https did not start correctly
E: Method https has died unexpectedly!
E: Sub-process https received signal 4.
E: Method /usr/lib/apt/methods/https did not start correctly
E: Method https has died unexpectedly!
E: Sub-process https received signal 4.
E: Method /usr/lib/apt/methods/https did not start correctly
E: Method https has died unexpectedly!
E: Sub-process https received signal 4.
E: Method /usr/lib/apt/methods/https did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http received signal 4.
E: Method /usr/lib/apt/methods/http did not start correctly
E: Method http has died unexpectedly!
E: Sub-process http received signal 4.
E: Method /usr/lib/apt/methods/http did not start correctly
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/stretch/InRelease
E: Failed to fetch https://apt.homegear.eu/Raspbian/stretch/InRelease
E: Failed to fetch https://deb.debian.org/debian/dists/stretch-backports/InRelease
E: Failed to fetch https://mirrordirector.raspbian.org/raspbian/dists/testing/InRelease
E: Failed to fetch https://dl.bintray.com/openhab/apt-repo2/dists/stable/InRelease
E: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/InRelease
E: Failed to fetch http://repos.azulsystems.com/debian/dists/stable/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.
Quando tento verificar a versão de /usr/lib/apt/methods/http
(https é um link para isso), recebo a seguinte saída:
[15:59:05] root@openHABianPi:/home/openhabian# /usr/lib/apt/methods/http
Illegal instruction
tenho apt-transport-https
instalado. Eu também fiz apt-get autoremove
e pode haver algumas dependências faltando em qualquer pacote que /usr/lib/apt/methods/http
faça parte, mesmo que eu saiba que isso não deveria acontecer.
Obrigado pela ajuda!
Editar 1:
[23:11:36] root@openHABianPi:/home/openhabian# dpkg -i apt_1.4.9_armhf.deb
dpkg: warning: downgrading apt from 1.8.0 to 1.4.9
(Reading database ... 47399 files and directories currently installed.)
Preparing to unpack apt_1.4.9_armhf.deb ...
Unpacking apt (1.4.9) over (1.8.0) ...
dpkg: dependency problems prevent configuration of apt:
libapt-pkg5.0:armhf (1.8.0) breaks apt (<< 1.6~) and is installed.
Version of apt to be configured is 1.4.9.
dpkg: error processing package apt (--install):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.28-8) ...
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
apt
Eu instalei libapt-pkg5.0_1.4.9_armhf.deb e consegui instalar apt_1.4.9_armhf.deb
Ainda tenho o problema de o apt-get update congelar 0% [Working]
em uma fonte, isso ainda pode ser causado por fontes incompatíveis.
Editar 2:
Os problemas foram causados por uma fonte errada originada de um letsencrypt/certbot-setup, livrei-me de todos os problemas restantes removendo a fonte, fixando meus pacotes no stable (estava usando "agora" para muitos pacotes) e basicamente fazendo muito cuidado apt-get dist-upgrade
com muita verificação manual. Você pode ter que excluir as fontes https temporariamente, mesmo com o apt-transport-https instalado, pois não funcionou para mim também (falha com "instrução ilegal" na chamada por /usr/lib/apt/methods/https
causa de dependências).