'/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 が壊れてしまいました。原因はまだわかりませんし、自分でも修正できませんでした。

root として実行しようとすると、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 update が 1 つのソースでフリーズするという問題がまだ残っていますが0% [Working]、これは互換性のないソースによって発生している可能性があります。

編集 2:
問題は、letsencrypt/certbot-setup から発生した間違ったソースによって発生しました。ソースを削除し、パッケージを安定版に固定し (多くのパッケージで「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ファイルはパッケージの一部でありapt、 でチェックされていますdpkg -S /usr/lib/apt/methods/http

メインリポジトリとなるものを閲覧するhttp://raspbian.raspberrypi.org/raspbian/dists/stretch/InReleaseそして特にhttp://raspbian.raspberrypi.org/raspbian/dists/stretch/main/binary-armhf/パッケージ(59Mです)

Package: apt
Version: 1.4.9

これは私のものと同じバージョン番号です。ですから、あなたのパッケージが何らかの理由でおかしくなったのだと思います。aptおそらく、別のソースからの互換性のないバージョンがそれを「アップグレード」したのでしょう。次のいずれかの方法で 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)、そのバージョンをロックすることを検討してください。

関連情報