目次: 自宅サーバー
Debianの更新はとても簡単でありがたいですが、セキュリティ強化やらなんやらで毎回やり方が変わりますね。11.7 (bullseye) から12.0 (bookworm) にバージョンアップする方法をメモしておきます。
まずaptのリポジトリ設定はstable指定とします。コードネーム指定は使ったことないので知らないです、たぶん書き換える必要があるはず。単にapt-get updateとdist-upgradeを実行すると下記のように怒られます。
# apt-get update && apt-get dist-upgrade 取得:1 http://ftp.jp.debian.org/debian stable InRelease [147 kB] 取得:2 http://security.debian.org stable-security InRelease [48.0 kB] 取得:3 http://security.debian.org stable-security/main Sources [9,184 B] 取得:4 http://security.debian.org stable-security/main amd64 Packages [17.6 kB] 取得:5 http://security.debian.org stable-security/main Translation-en [7,460 B] パッケージリストを読み込んでいます... 完了 N: Repository 'http://ftp.jp.debian.org/debian stable InRelease' changed its 'Version' value from '11.7' to '12.0' E: Repository 'http://ftp.jp.debian.org/debian stable InRelease' changed its 'Codename' value from 'bullseye' to 'bookworm' N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
エラーメッセージにあるapt-secureのヘルプを眺めても特に何も書いてなくて悲しいですが、apt-getの説明を見ると --allow-releaseinfo-changeというオプションがあるようです。悲しいことにまだ和訳がなくて英語のままでした……。
--allow-releaseinfo-change
Allow the update command to continue downloading data from a
repository which changed its information of the release contained
in the repository indicating e.g a new major release. APT will fail
at the update command for such repositories until the change is
confirmed to ensure the user is prepared for the change. See also
apt-secure(8) for details on the concept and configuration.
Specialist options (--allow-releaseinfo-change-field) exist to
allow changes only for certain fields like origin, label, codename,
suite, version and defaultpin. See also apt_preferences(5).
Configuration Item: Acquire::AllowReleaseInfoChange.
(適当訳)
updateコマンドにリリースの情報が変更されたリポジトリ(新たなメジャーリリースなどを示す)からのデータのダウンロード継続を許可します。
ユーザーが確実に変更に対して準備ができるように、変更が確認されるまでは、APTはそのようなリポジトリに対するupdateコマンドを失敗させます。
概念や設定の詳細についてはapt-secure(8) も参照してください。
いくつかのorigin, label, codename, suite, version, defaultpinのようなフィールドに限った変更を許可するための、専門家向けオプション(--allow-releaseinfo-change-field)があります。
apt_preferences(5) も参照してください。
設定項目: Acquire::AllowReleaseInfoChange
私の和訳は若干怪しいですけど、apt-get update --allow-releaseinfo-changeを実行すれば良さそうです。security.debian.orgのInReleaseは、この日記を書く前にallow-releaseinfo-changeをしたせい?なのか、取得にならずヒット(既に更新済み)になっています。気にしないでください。
# apt-get update --allow-releaseinfo-change 取得:1 http://ftp.jp.debian.org/debian stable InRelease [116 kB] ヒット:2 http://security.debian.org stable-security InRelease 116 kBを0秒 で取得しました (252 kB/s) パッケージリストを読み込んでいます... 完了 # apt-get update && apt-get dist-upgrade ヒット:1 http://security.debian.org stable-security InRelease 取得:2 http://ftp.jp.debian.org/debian stable InRelease [147 kB] パッケージリストを読み込んでいます... 完了 N: Repository 'http://ftp.jp.debian.org/debian stable InRelease' changed its 'Version' value from '11.7' to '12.0' E: Repository 'http://ftp.jp.debian.org/debian stable InRelease' changed its 'Codename' value from 'bullseye' to 'bookworm' N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
あれ?ダメですね、まだ怒っています。もう一回やってみましょうか。
# apt-get update --allow-releaseinfo-change 取得:1 http://ftp.jp.debian.org/debian stable InRelease [147 kB] 取得:2 http://ftp.jp.debian.org/debian stable/non-free Sources [78.2 kB] 取得:3 http://ftp.jp.debian.org/debian stable/main Sources [9,628 kB] ヒット:4 http://security.debian.org stable-security InRelease 取得:5 http://ftp.jp.debian.org/debian stable/contrib Sources [51.2 kB] 取得:6 http://ftp.jp.debian.org/debian stable/main amd64 Packages [8,904 kB] 取得:7 http://ftp.jp.debian.org/debian stable/main Translation-ja [754 kB] 取得:8 http://ftp.jp.debian.org/debian stable/main Translation-en [6,076 kB] 取得:9 http://ftp.jp.debian.org/debian stable/main all Contents (deb) [32.8 MB] 取得:10 http://ftp.jp.debian.org/debian stable/main amd64 Contents (deb) [11.3 MB] 取得:11 http://ftp.jp.debian.org/debian stable/contrib amd64 Packages [54.3 kB] 取得:12 http://ftp.jp.debian.org/debian stable/contrib Translation-en [48.7 kB] 取得:13 http://ftp.jp.debian.org/debian stable/contrib amd64 Contents (deb) [61.2 kB] 取得:14 http://ftp.jp.debian.org/debian stable/contrib all Contents (deb) [98.6 kB] 取得:15 http://ftp.jp.debian.org/debian stable/non-free amd64 Packages [98.5 kB] 取得:16 http://ftp.jp.debian.org/debian stable/non-free Translation-en [67.2 kB] 取得:17 http://ftp.jp.debian.org/debian stable/non-free all Contents (deb) [839 kB] 取得:18 http://ftp.jp.debian.org/debian stable/non-free amd64 Contents (deb) [76.4 kB] 71.1 MBを23秒 で取得しました (3,091 kB/s) パッケージリストを読み込んでいます... 完了 N: Repository 'http://ftp.jp.debian.org/debian stable InRelease' changed its 'Version' value from '11.7' to '12.0' N: Repository 'http://ftp.jp.debian.org/debian stable InRelease' changed its 'Codename' value from 'bullseye' to 'bookworm' # apt-get update && apt-get dist-upgrade ヒット:1 http://security.debian.org stable-security InRelease ヒット:2 http://ftp.jp.debian.org/debian stable InRelease パッケージリストを読み込んでいます... 完了 パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています... 完了 状態情報を読み取っています... 完了 アップグレードパッケージを検出しています... 完了 (以下略)
今度はうまくいきました。先ほどとの違いは良くわかりませんが、めげずに何回かやった方が良いんでしょうか。
この記事にコメントする
目次: Arduino
目次: 一覧の一覧
この記事にコメントする
目次: 自宅サーバー
この日記システム、Wikiの話。
自宅のサーバー、Sakuraで借りているサーバー、その他の話。
目次: 一覧の一覧
この記事にコメントする
| < | 2023 | > | ||||
| << | < | 06 | > | >> | ||
| 日 | 月 | 火 | 水 | 木 | 金 | 土 |
| - | - | - | - | 1 | 2 | 3 |
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | - |
25年10月15日
25年10月18日
22年5月5日
25年10月19日
23年4月11日
06年4月22日
25年10月17日
25年10月6日
25年10月13日
20年10月23日
25年10月12日
20年8月29日
19年1月13日
18年10月13日
18年9月3日
18年8月20日
18年7月23日
18年7月22日
18年10月14日
18年11月10日
wiki
Linux JM
Java API
2002年
2003年
2004年
2005年
2006年
2007年
2008年
2009年
2010年
2011年
2012年
2013年
2014年
2015年
2016年
2017年
2018年
2019年
2020年
2021年
2022年
2023年
2024年
2025年
過去日記について
アクセス統計
サーバ一覧
サイトの情報合計:
本日: