'/usr/lib/apt/methods/http'를 호출할 때 openhabian에서 apt-get 오류가 발생합니다.

'/usr/lib/apt/methods/http'를 호출할 때 openhabian에서 apt-get 오류가 발생합니다.

제가 바로 여기 있었으면 좋겠습니다. 며칠 전에 Raspberry Pi Model B rev가 고장났습니다. 2(Openhabian 실행). 아직 이유를 잘 모르겠고 직접 고칠 수도 없었습니다.

루트로 로그인하려고 하면 apt-get update다음과 같은 결과가 나타납니다.

[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.

/usr/lib/apt/methods/http(https에 대한 링크가 있습니다) 버전을 확인하려고 하면 다음과 같은 결과가 나타납니다.

[15:59:05] root@openHABianPi:/home/openhabian# /usr/lib/apt/methods/http
Illegal instruction

설치 했습니다 apt-transport-https. 나 또한 그렇게 했고 apt-get autoremove, 어떤 패키지가 포함되어 있든 간에 일부 종속성이 누락되었을 수 있으며 /usr/lib/apt/methods/http, 그런 일이 발생해서는 안 된다는 것을 아는 한 어렵습니다.

도와주셔서 감사합니다!

편집 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

설치했습니다libapt-pkg5.0_1.4.9_armhf.deb그런 다음 설치할 수있었습니다apt_1.4.9_armhf.deb

여전히 한 소스에서 apt-get 업데이트가 중단되는 문제가 있습니다 0% [Working]. 이는 여전히 호환되지 않는 소스로 인해 발생할 수 있습니다.

편집 2:
문제는 letsencrypt/certbot-setup에서 발생한 잘못된 소스로 인해 발생했습니다. 소스를 제거하고 내 패키지를 stable에 고정하여(많은 패키지에 "now"를 사용함) 남아 있는 모든 문제를 제거했습니다. 기본적으로 apt-get dist-upgrade많은 수동 검사를 통해 매우 신중하게 작업합니다 . 나에게도 작동하지 않았기 때문에 apt-transport-https가 설치된 경우에도 https 소스를 일시적으로 제외해야 할 수도 있습니다( /usr/lib/apt/methods/https종속성으로 인해 호출 시 "불법 지침"으로 실패함 ).

답변1

나는 당신이 dpkg여전히 잘 작동하기를 바라고 있습니다... 내 Debian/MX 시스템(또한 Debian Stretch 기반)에서 파일 은 패키지 /usr/lib/apt/methods/http의 일부이며 .aptdpkg -S /usr/lib/apt/methods/http

주요 저장소가 될 수 있는 항목을 탐색합니다.http://raspbian.raspberrypi.org/raspbian/dists/stretch/InRelease그리고 구체적으로 살펴보면http://raspbian.raspberrypi.org/raspbian/dists/stretch/main/binary-armhf/Packages(59M입니다) 그렇군요

Package: apt
Version: 1.4.9

내 것과 동일한 버전 번호입니다. 그래서 나는 당신의 패키지가 어떻게 든 엉망이 된 것 같아요 apt. 아마도 다른 소스의 호환되지 않는 버전이 패키지를 "업그레이드"했을까요? 다음 중 하나를 사용하여 아파트 버전을 확인할 수 있습니다.

  • apt-cache showpkg apt
  • apt-cache show aptapt-cache가 여전히 작동하는 경우 또는
  • dpkg -s apt
  • dpkg-query --show apt

1.4.9가 아니길 바라며, 이 버전을 설치해 보시기 바랍니다. 저장소를 통해 더 많은 것을 탐색하고, http://raspbian.raspberrypi.org/raspbian/pool/main/a/apt/가지고있다apt_1.4.9_armhf.deb파일.

[그것은미러 목록은 여기에 있습니다, 다른 다운로드 링크와 함께.]

.deb를 다운로드하면. 파일을 다운로드하여 설치하세요.

dpkg -i apt_1.4.9_armhf.deb

그러면 좋은 버전의 apt를 설치해야 합니다.

apt를 손상된 버전으로 다시 "업그레이드"하지 않도록 주의하세요. 후보 소스를 확인하고 apt-cache policy apt"나쁜" 소스를 제거하거나, apt좋은 소스에만 고정 man apt_preferences하거나( 참조) 해당 버전을 잠그는 것을 고려해 보겠습니다.

관련 정보