どうやら、これに当たってしまったらしい。

Debian GNU/Linux で cdn.debian.net の aptitude update に失敗する
DebianJPこうほうチームさんはTwitterを使っています: "cdn.debian.net は http.debian.net を参照するようになったようです。お疲れ様でしたー"

Debian GNU/Linux で cdn.debian.net の aptitude update に失敗する
DebianJPこうほうチームさんはTwitterを使っています: "ひとつわかったのは cdn.debian.net (or.jpじゃない方) 使っていた場合、ホストのバージョンが古いと http.debian.net の http redirect に対応してなくてエラーになるよ、ということでした。"

いままで、apt-line をこんな感じに cdn.debian.net を利用するように設定していた。


# cat /etc/apt/sources.list
 
deb http://cdn.debian.net/debian/ wheezy main contrib non-free
deb http://cdn.debian.net/debian/ wheezy-updates main contrib non-free
deb http://cdn.debian.net/debian/ wheezy-backports main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://cdn.debian.net/debian/ wheezy main contrib non-free
deb-src http://cdn.debian.net/debian/ wheezy-updates main contrib non-free
deb-src http://cdn.debian.net/debian/ wheezy-backports main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

すると、 aptitude update に失敗するようになってしまった。

調べてみたら、どうやら cdn.debian.net はもう使うのを推奨されていないらしい。

DebianGeoMirror is discussion wiki to manage Debian global mirror servers by DNS.

DebianGeoMirror - Debian Wiki

http://cdn.debian.net/ は "deprecated" であると書かれている。

http.debian.net もどうやら CDN (Contents Delivery Network) なサーバーらしい。

If you are familiar with cdn.debian.net you should think of http.debian.net as a superior replacement.

Debian mirrors HTTP redirector

cdn.debian.net の代替として http.debian.net を使うのが良さそう。

そのため、 cdn.debian.net を http.debian.net に書き換えた。


# cat /etc/apt/sources.list
 
deb http://http.debian.net/debian/ wheezy main contrib non-free
deb http://http.debian.net/debian/ wheezy-updates main contrib non-free
deb http://http.debian.net/debian/ wheezy-backports main contrib non-free
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://http.debian.net/debian/ wheezy main contrib non-free
deb-src http://http.debian.net/debian/ wheezy-updates main contrib non-free
deb-src http://http.debian.net/debian/ wheezy-backports main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

これで問題なく動くようになった。

今回の環境

Debian GNU/Linux 7 wheezy


# uname -mrsv
Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64
 
# cat /etc/debian_version
7.8

cdn.debian.net を使って発生したエラー


# aptitude update
Hit http://security.debian.org wheezy/updates Release.gpg
Hit http://security.debian.org wheezy/updates Release
Hit http://security.debian.org wheezy/updates/main Sources
Hit http://security.debian.org wheezy/updates/contrib Sources
Hit http://security.debian.org wheezy/updates/non-free Sources
Hit http://security.debian.org wheezy/updates/main amd64 Packages
Hit http://security.debian.org wheezy/updates/contrib amd64 Packages
Hit http://security.debian.org wheezy/updates/non-free amd64 Packages
Hit http://security.debian.org wheezy/updates/contrib Translation-en
Hit http://security.debian.org wheezy/updates/main Translation-en
Hit http://security.debian.org wheezy/updates/non-free Translation-en
Ign http://cdn.debian.net wheezy Release.gpg
Ign http://cdn.debian.net wheezy-updates Release.gpg
Ign http://cdn.debian.net wheezy-backports Release.gpg
Ign http://cdn.debian.net wheezy Release
Ign http://cdn.debian.net wheezy-updates Release
Ign http://cdn.debian.net wheezy-backports Release
Ign http://cdn.debian.net wheezy/main Sources/DiffIndex
Ign http://cdn.debian.net wheezy/contrib Sources/DiffIndex
Ign http://cdn.debian.net wheezy/non-free Sources/DiffIndex
Ign http://cdn.debian.net wheezy/main amd64 Packages/DiffIndex
Ign http://cdn.debian.net wheezy/contrib amd64 Packages/DiffIndex
Ign http://cdn.debian.net wheezy/non-free amd64 Packages/DiffIndex
Ign http://cdn.debian.net wheezy-updates/main Sources/DiffIndex
Ign http://cdn.debian.net wheezy-updates/contrib Sources/DiffIndex
Ign http://cdn.debian.net wheezy-updates/non-free Sources/DiffIndex
Ign http://cdn.debian.net wheezy-updates/main amd64 Packages/DiffIndex
Ign http://cdn.debian.net wheezy-updates/contrib amd64 Packages/DiffIndex
Ign http://cdn.debian.net wheezy-updates/non-free amd64 Packages/DiffIndex
Ign http://cdn.debian.net wheezy-backports/main Sources/DiffIndex
Ign http://cdn.debian.net wheezy-backports/contrib Sources/DiffIndex
Ign http://cdn.debian.net wheezy-backports/non-free Sources/DiffIndex
Ign http://cdn.debian.net wheezy-backports/main amd64 Packages/DiffIndex
Ign http://cdn.debian.net wheezy-backports/contrib amd64 Packages/DiffIndex
Ign http://cdn.debian.net wheezy-backports/non-free amd64 Packages/DiffIndex
Ign http://cdn.debian.net wheezy/contrib Translation-ja_JP
Ign http://cdn.debian.net wheezy/contrib Translation-ja
Ign http://cdn.debian.net wheezy/contrib Translation-en
Ign http://cdn.debian.net wheezy/main Translation-ja_JP
Ign http://cdn.debian.net wheezy/main Translation-ja
Ign http://cdn.debian.net wheezy/main Translation-en
Ign http://cdn.debian.net wheezy/non-free Translation-ja_JP
Ign http://cdn.debian.net wheezy/non-free Translation-ja
Ign http://cdn.debian.net wheezy/non-free Translation-en
Ign http://cdn.debian.net wheezy-updates/contrib Translation-ja_JP
Ign http://cdn.debian.net wheezy-updates/contrib Translation-ja
Ign http://cdn.debian.net wheezy-updates/contrib Translation-en
Ign http://cdn.debian.net wheezy-updates/main Translation-ja_JP
Ign http://cdn.debian.net wheezy-updates/main Translation-ja
Ign http://cdn.debian.net wheezy-updates/main Translation-en
Ign http://cdn.debian.net wheezy-updates/non-free Translation-ja_JP
Ign http://cdn.debian.net wheezy-updates/non-free Translation-ja
Ign http://cdn.debian.net wheezy-updates/non-free Translation-en
Ign http://cdn.debian.net wheezy-backports/contrib Translation-ja_JP
Ign http://cdn.debian.net wheezy-backports/contrib Translation-ja
Ign http://cdn.debian.net wheezy-backports/contrib Translation-en
Ign http://cdn.debian.net wheezy-backports/main Translation-ja_JP
Ign http://cdn.debian.net wheezy-backports/main Translation-ja
Ign http://cdn.debian.net wheezy-backports/main Translation-en
Ign http://cdn.debian.net wheezy-backports/non-free Translation-ja_JP
Ign http://cdn.debian.net wheezy-backports/non-free Translation-ja
Ign http://cdn.debian.net wheezy-backports/non-free Translation-en
Err http://cdn.debian.net wheezy/main Sources
  404  Not Found
Err http://cdn.debian.net wheezy/contrib Sources
  404  Not Found
Err http://cdn.debian.net wheezy/non-free Sources
  404  Not Found
Err http://cdn.debian.net wheezy/main amd64 Packages
  404  Not Found
Err http://cdn.debian.net wheezy/contrib amd64 Packages
  404  Not Found
Err http://cdn.debian.net wheezy/non-free amd64 Packages
  404  Not Found
Err http://cdn.debian.net wheezy-updates/main Sources
  404  Not Found
Err http://cdn.debian.net wheezy-updates/contrib Sources
  404  Not Found
Err http://cdn.debian.net wheezy-updates/non-free Sources
  404  Not Found
Err http://cdn.debian.net wheezy-updates/main amd64 Packages
  404  Not Found
Err http://cdn.debian.net wheezy-updates/contrib amd64 Packages
  404  Not Found
Err http://cdn.debian.net wheezy-updates/non-free amd64 Packages
  404  Not Found
Err http://cdn.debian.net wheezy-backports/main Sources
  404  Not Found
Err http://cdn.debian.net wheezy-backports/contrib Sources
  404  Not Found
Err http://cdn.debian.net wheezy-backports/non-free Sources
  404  Not Found
Err http://cdn.debian.net wheezy-backports/main amd64 Packages
  404  Not Found
Err http://cdn.debian.net wheezy-backports/contrib amd64 Packages
  404  Not Found
Err http://cdn.debian.net wheezy-backports/non-free amd64 Packages
  404  Not Found
100% [Working]W: http://cdn.debian.net/debian/dists/wheezy/main/source/Sources  を取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy/contrib/source/Sources を取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy/non-free/source/Sources を取得でき ませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy/main/binary-amd64/Packages を取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy/contrib/binary-amd64/Packages を取 得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy/non-free/binary-amd64/Packages を取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy-updates/main/source/Sources を取得 できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy-updates/contrib/source/Sources を取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy-updates/non-free/source/Sources を 取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy-updates/main/binary-amd64/Packages を取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy-updates/contrib/binary-amd64/Packages を取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy-updates/non-free/binary-amd64/Packages を取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy-backports/main/source/Sources を取 得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy-backports/contrib/source/Sources を取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy-backports/non-free/source/Sources  を取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy-backports/main/binary-amd64/Packages を取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy-backports/contrib/binary-amd64/Packages を取得できませんでした: 404  Not Found
W: http://cdn.debian.net/debian/dists/wheezy-backports/non-free/binary-amd64/Packages を取得できませんでした: 404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: パッケージキャッシュを再構築できませんでした

http.debian.net を使って成功


# aptitude update
Hit http://security.debian.org wheezy/updates Release.gpg
Hit http://security.debian.org wheezy/updates Release
Hit http://security.debian.org wheezy/updates/main Sources
Hit http://security.debian.org wheezy/updates/contrib Sources
Hit http://security.debian.org wheezy/updates/non-free Sources
Hit http://security.debian.org wheezy/updates/main amd64 Packages
Hit http://security.debian.org wheezy/updates/contrib amd64 Packages
Hit http://security.debian.org wheezy/updates/non-free amd64 Packages
Hit http://security.debian.org wheezy/updates/contrib Translation-en
Hit http://security.debian.org wheezy/updates/main Translation-en
Hit http://security.debian.org wheezy/updates/non-free Translation-en
取得: 1 http://http.debian.net wheezy Release.gpg [1,655 B]
取得: 2 http://http.debian.net wheezy-updates Release.gpg [836 B]
取得: 3 http://http.debian.net wheezy-backports Release.gpg [836 B]
取得: 4 http://http.debian.net wheezy Release [168 kB]
取得: 5 http://http.debian.net wheezy-updates Release [124 kB]
取得: 6 http://http.debian.net wheezy-backports Release [147 kB]
取得: 7 http://http.debian.net wheezy/main Sources [5,971 kB]
取得: 8 http://http.debian.net wheezy/contrib Sources [47.7 kB]
取得: 9 http://http.debian.net wheezy/non-free Sources [93.5 kB]
取得: 10 http://http.debian.net wheezy/main amd64 Packages [5,841 kB]
取得: 11 http://http.debian.net wheezy/contrib amd64 Packages [42.0 kB]
取得: 12 http://http.debian.net wheezy/non-free amd64 Packages [80.8 kB]
取得: 13 http://http.debian.net wheezy/contrib Translation-en [34.8 kB]
取得: 14 http://http.debian.net wheezy/main Translation-ja [873 kB]
取得: 15 http://http.debian.net wheezy/main Translation-en [3,848 kB]
取得: 16 http://http.debian.net wheezy/non-free Translation-en [66.1 kB]
取得: 17 http://http.debian.net wheezy-updates/main Sources [3,311 B]
取得: 18 http://http.debian.net wheezy-updates/contrib Sources [14 B]
取得: 19 http://http.debian.net wheezy-updates/non-free Sources [14 B]
取得: 20 http://http.debian.net wheezy-updates/main amd64 Packages [4,372 B]
取得: 21 http://http.debian.net wheezy-updates/contrib amd64 Packages [14 B]
取得: 22 http://http.debian.net wheezy-updates/non-free amd64 Packages [14 B]
取得: 23 http://http.debian.net wheezy-updates/contrib Translation-en [14 B]
取得: 24 http://http.debian.net wheezy-updates/main Translation-en [3,198 B]
取得: 25 http://http.debian.net wheezy-updates/non-free Translation-en [14 B]
取得: 26 http://http.debian.net wheezy-backports/main Sources [416 kB]
取得: 27 http://http.debian.net wheezy-backports/contrib Sources [7,887 B]
取得: 28 http://http.debian.net wheezy-backports/non-free Sources [8,888 B]
取得: 29 http://http.debian.net wheezy-backports/main amd64 Packages [552 kB]
取得: 30 http://http.debian.net wheezy-backports/contrib amd64 Packages [8,707 B]
取得: 31 http://http.debian.net wheezy-backports/non-free amd64 Packages [21.5 kB]
取得: 32 http://http.debian.net wheezy-backports/contrib Translation-en [6,265 B]
取得: 33 http://http.debian.net wheezy-backports/main Translation-en [352 kB]
取得: 34 http://http.debian.net wheezy-backports/non-free Translation-en [21.5 kB]
Fetched 18.7 MB in 28秒 (650 kB/s)
 
現在の状態: 新規が 37002 個 [+35814]。

tags: debian

Posted by NI-Lab. (@nilab)