I hope I'm right here, some days ago apt-get broke on my Raspberry Pi Model B rev. 2 (running Openhabian). I'm not sure why yet and wasn't able to fix it myself.
When I try to apt-get update
as root I get the following output:
[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.
When I try to check the version of /usr/lib/apt/methods/http
(https is a link to that) I get the following output:
[15:59:05] root@openHABianPi:/home/openhabian# /usr/lib/apt/methods/http
Illegal instruction
I have apt-transport-https
installed. I also did apt-get autoremove
and there may be some dependences missing from whatever package /usr/lib/apt/methods/http
is part of, even tough as far as I know that shouldn't happen.
Thank you for your help!
Edit 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
I installed libapt-pkg5.0_1.4.9_armhf.deb and then was able to install apt_1.4.9_armhf.deb
I still have the problem that apt-get update freezes with 0% [Working]
at one source, this may still be caused by incompatible sources.
Edit 2:
The problems were caused by a wrong source originating from a letsencrypt/certbot-setup, I got rid of all remaining problems by removing the source, pinning my packages to stable (was using "now" for a lot of packages) and basically doing a very careful apt-get dist-upgrade
with a lot of manual checking. You may have to exclude https sources temporarily even with apt-transport-https installed as it didn't work for me too (failed with "Illegal instruction" on call of /usr/lib/apt/methods/https
because of dependencies).