
Debian Wheezyでは、私の/etc/apt/sources.list
ファイルは次のようになります。
deb https://mirrors.kernel.org/debian/ wheezy main contrib non-free
deb-src https://mirrors.kernel.org/debian/ wheezy main contrib non-free
deb http://security.debian.org/debian/ wheezy main contrib non-free
deb-src http://security.debian.org/debian/ wheezy main contrib non-free
deb https://mirrors.kernel.org/debian/ wheezy-updates main contrib non-free
deb-src https://mirrors.kernel.org/debian/ wheezy-updates main contrib non-free
次の操作を行うと、次のsudo apt-get update
エラー メッセージが表示されます。
E: The method driver /usr/lib/apt/methods/https could not be found
解決策は何ですか?
答え1
このパッケージをインストールする必要がありますapt-transport-https
。パッケージをダウンロードするのではなく、パッケージを読むにはsource.listを一時的に編集する必要がありますhttp
。https:
答え2
私の問題はやや似ています。私の/etc/apt/sources.list
ファイルにはhttpsを読み取るリポジトリはありません。ただし、パッケージをインストールできません。コマンドの実行時に発生するエラーsudo apt-get install apt-transport-https
は次のとおりです。
Err http://ftp.us.debian.org/debian/ testing/main apt-transport-https amd64 1.0.9.5 404 Not Found [IP: 64.50.236.52 80]
E: Failed to fetch http://ftp.us.debian.org/debian/pool/main/a/apt/apt-transport-https_1.0.9.5_amd64.deb 404 Not Found [IP: 64.50.236.52 80]
エラーを詳しく見てみると、aptが古いパッケージを指しているようです。だから、検索を通じて手動でパッケージを追跡しましたhttp://ftp.us.debian.org/debian/pool/main/a/apt/
。そこにバージョンがapt-transport-https_1.0.9.5_amd64.deb
存在しないため、aptがパッケージを入手できないことがわかりました。
この問題を解決するためにapt-transport-https_1.0.9.6_amd64.deb
リンクからダウンロードして使用しましたdpkg -i apt-transport-https*
。その後実行してみるとうまくsudo apt-get update
いきました。
ソースファイルに問題はありませんが、aptがパッケージを取得できない場合は、パッケージを手動で追跡して解決策にすることができます。