"apt-get install -f apt-transport-https"エラーを修正する方法:404が見つかりませんか?

起動スクリプトの一部として apt-transport-https をインストールする負荷分散ホスティング VM ペアがあります。

ただし、最近のサーバーは起動時にミラーに存在しなくなったため、必要なパッケージバージョン(1.0.9.8.3)をダウンロードできなくなったため、エラー状態になりました。http://httpredir.debian.org/debian/pool/main/a/apt

root@validator-dev-group-c2v4:/etc# apt-get install -f apt-transport-https
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 27 not upgraded.
Need to get 138 kB of archives.
After this operation, 195 kB of additional disk space will be used.
Err http://httpredir.debian.org/debian/ jessie/main apt-transport-https amd64 1.0.9.8.3
  404  Not Found
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/a/apt/apt-transport-https_1.0.9.8.3_amd64.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

私が試した提案は--fix-missing役に立ちませんでした。

root@validator-dev-group-c2v4:/etc# apt-get install --fix-missing apt-transport-https
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 27 not upgraded.
Need to get 138 kB of archives.
After this operation, 195 kB of additional disk space will be used.
Err http://httpredir.debian.org/debian/ jessie/main apt-transport-https amd64 1.0.9.8.3
  404  Not Found
E: Failed to fetch http://httpredir.debian.org/debian/pool/main/a/apt/apt-transport-https_1.0.9.8.3_amd64.deb  404  Not Found
E: Internal Error, ordering was unable to handle the media swap

次に、apt-transport-https(1.0.9.8.4)の親バージョンを手動でダウンロードしましたが、libapt-pkg4.12への依存関係のために直接インストールできませんでした。

root@validator-dev-group-c2v4:/home/<user># sudo dpkg -i ./apt-transport-https_1.0.9.8.4_amd64.deb 
Selecting previously unselected package apt-transport-https.
(Reading database ... 26719 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.0.9.8.4_amd64.deb ...
Unpacking apt-transport-https (1.0.9.8.4) ...
dpkg: dependency problems prevent configuration of apt-transport-https:
 apt-transport-https depends on libapt-pkg4.12 (>= 1.0.9.8.4); however:
  Version of libapt-pkg4.12:amd64 on system is 1.0.9.8.3.

誰でもこの問題を解決するのに役立ちますか? libapt-pkg4.12をアップグレードするのと同じくらい簡単ですか?では、どうすればよいですか?

編集する:まだインストールしていapt-get updateないため実行できません。apt-transport-https私は彼らがそれをCatch-22と呼んでいると思います!

root@validator-dev-group-c2v4:/home/<user># apt-get update
E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?

私の/etc/apt/sources.list姿はこんな感じです。

deb http://httpredir.debian.org/debian/ jessie main
deb-src http://httpredir.debian.org/debian/ jessie main
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
deb http://httpredir.debian.org/debian/ jessie-updates main
deb-src http://httpredir.debian.org/debian/ jessie-updates main

事前にありがとう

ベストアンサー1

httpsディレクトリをディレクトリ/usr/lib/apt/methodsにシンボリックリンクしてhttp問題を解決したようです。

root@validator-dev-group-c2v4:~# cd /usr/lib/apt/methods
root@validator-dev-group-c2v4:/usr/lib/apt/methods# ln -s http https

実際にソースを設定していないのでhttps://無害に見えますが、実行時apt-get install apt-transport-httpsには実際にシンボリックリンクを正しいファイルで上書きします。

おすすめ記事