4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【2022/04/05 時点】Debian 9 で apt-get update を実行すると、「Could not connect to deb.debian.org:80 (151.101.110.132)」が発生する問題と対策

Posted at

概要

過去に docker build に成功した Dockerfile (Debian 9) において、
apt-get update を追加し実行すると、次のエラーが発生した

このときの原因と対策の記録である.

当然、人によって原因は異なるので注意が必要である.

エラーログ

Err:1 http://deb.debian.org/debian stretch/main amd64 python3-minimal amd64 3.5.3-1
  Could not connect to debian.map.fastlydns.net:80 (151.101.74.132) 略

原因

下記 /etc/apt/sources.list に定義された URL から、
stretch (Debian 9) のパッケージリストが存在しなくなったため

# cat /etc/apt/sources.list
deb http://deb.debian.org/debian stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb http://deb.debian.org/debian stretch-updates main

対策

ミラーサイト「http://ftp.jp.debian.org」を参照するように変更した

$ cat /etc/apt/sources.list
deb http://ftp.jp.debian.org/debian/ stretch main contrib non-free
deb http://ftp.jp.debian.org/debian/ stretch-proposed-updates main contrib  non-free
deb http://ftp.jp.debian.org/debian/ stretch-updates main contrib
deb http://ftp.jp.debian.org/debian/ stretch-backports main contrib  non-free

その他

事前に、Proxy サーバを使用する設定が正しいことは確認した.

関連記事

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?