コグノスケ


link 未来から過去へ表示(*)  link 過去から未来へ表示

link もっと前
2023年6月13日 >>> 2023年5月31日
link もっと後

2023年6月13日

Debian 12 Bookwormにアップデート

目次: 自宅サーバー

Debianの更新はとても簡単でありがたいですが、セキュリティ強化やらなんやらで毎回やり方が変わりますね。11.7 (bullseye) から12.0 (bookworm) にバージョンアップする方法をメモしておきます。

まずaptのリポジトリ設定はstable指定とします。コードネーム指定は使ったことないので知らないです、たぶん書き換える必要があるはず。単にapt-get updateとdist-upgradeを実行すると下記のように怒られます。

InReleaseが変わっていると怒られる
# 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というオプションがあるようです。悲しいことにまだ和訳がなくて英語のままでした……。

apt-getのヘルプ
       --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をしたせい?なのか、取得にならずヒット(既に更新済み)になっています。気にしないでください。

InReleaseの更新
# 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.

あれ?ダメですね、まだ怒っています。もう一回やってみましょうか。

InReleaseの更新、再び
# 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
パッケージリストを読み込んでいます... 完了
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています... 完了
状態情報を読み取っています... 完了
アップグレードパッケージを検出しています... 完了
(以下略)

今度はうまくいきました。先ほどとの違いは良くわかりませんが、めげずに何回かやった方が良いんでしょうか。

編集者:すずき(2025/08/21 01:42)

コメント一覧

  • hdkさん(2023/06/13 22:57)
    リリースノートのアップグレード手順を見ると時々いろいろとこわいことが書かれているので(特にsystemdが導入された時など)、間違えてアップグレードしないために、stableじゃなくてコードネーム指定で使っています。
  • すずきさん(2023/06/14 14:23)
    私はあまりカスタマイズしていない(SSH, SambaとWebサーバーくらいしか使っていない)のもあって、ぶっ飛んだら直すのさ〜と割と気楽にアップグレードしてしまいます。
open/close この記事にコメントする




2023年6月1日

自宅サーバー - まとめリンク

目次: 自宅サーバー

この日記システム、Wikiの話。

自宅のサーバー、Sakuraで借りているサーバー、その他の話。

目次: 一覧の一覧

編集者:すずき(2026/02/09 22:09)

コメント一覧

  • コメントはありません。
open/close この記事にコメントする



link もっと前
2023年6月13日 >>> 2023年5月31日
link もっと後

管理用メニュー

link 記事を新規作成

<2023>
<<<06>>>
----123
45678910
11121314151617
18192021222324
252627282930-

最近のコメント5件

  • link 26年1月23日
    すずきさん (01/29 09:48)
    「おおー、そんな昔からなんですね。歴史感じ...」
  • link 26年1月23日
    hdkさん (01/27 19:53)
    「#! はUNIX v8からだったってWi...」
  • link 24年12月9日
    すずきさん (01/18 15:45)
    「Thank you for your i...」
  • link 24年12月9日
    Up2Uさん (01/15 12:57)
    「Hi I also find the p...」
  • link 25年12月18日
    すずきさん (12/23 23:51)
    「良く見たらksys_read()でfil...」

最近の記事20件

  • link 26年3月6日
    すずき (03/19 02:54)
    「[CRCの計算その2 - 最上位ビットの省略] 目次: ベンチマーク前回、CRCの筆算とMSBに寄せていくCRCの計算方法を紹...」
  • link 21年5月22日
    すずき (03/19 02:54)
    「[ベンチマーク - まとめリンク] 目次: ベンチマーク色々なベンチマーク、コードゴルフ。USB HDD RAIDのベンチマー...」
  • link 26年3月2日
    すずき (03/19 02:53)
    「[CRCの計算その1 - 筆算] 目次: ベンチマーク令和の時代に今更ですがCRCについて調べてました。CRCのベースになる数...」
  • link 26年3月10日
    すずき (03/13 00:54)
    「[誕生日] 43歳になりました。昨年の日記(2025年3月10日の日記参照)を見ると、転職して半年というのもあって通勤の話をし...」
  • link 22年4月13日
    すずき (03/12 23:48)
    「[C言語とlibc - まとめリンク] 目次: C言語とlibcC言語について。C++言語もたまに。プログラムの落とし穴、演算...」
  • link 07年11月1日
    すずき (03/12 23:47)
    「[netcatとsigned charとunsigned char] 目次: C言語とlibcGNU netcat 0.7.1...」
  • link 20年10月23日
    すずき (03/12 23:32)
    「[ARM - まとめリンク] 目次: ARMROCK64のブート、オーディオ。ROCK64購入ROCK64とU-Bootのdi...」
  • link 18年7月21日
    すずき (03/12 23:31)
    「[Bluetooth UART変換] 目次: ARMUARTをBluetoothに変換してくれるHC-06(モジュールの販売サ...」
  • link 02年11月22日
    すずき (03/12 23:28)
    「[ハフマン符号化プログラム] 目次: ベンチマークハフマン符号化プログラムですが、メモリ節約バージョンが完成しました。技術が足...」
  • link 22年11月11日
    すずき (03/12 23:26)
    「[手動の最適化 対 コンパイラの最適化] 目次: ベンチマークポッキーの日だそうですが、1(と0)といえば2進数、2進数といえ...」
  • link 07年11月2日
    すずき (03/12 23:25)
    「[ビット演算の極み(ハッカーのたのしみ)] 目次: ベンチマーク今日はコードを2つ紹介(出典: ハッカーのたのしみ, Henr...」
  • link 23年4月10日
    すずき (03/12 23:18)
    「[Linux - まとめリンク] 目次: Linuxカーネル、ドライバ関連。Linux kernel 2.4 for ARMが...」
  • link 15年11月22日
    すずき (03/12 23:17)
    「[自作エミュレータに外の世界とのI/Oを付けたい] 目次: Linux自作エミュレータに外部とのアクセス手段を足そうと思い、A...」
  • link 23年9月11日
    すずき (03/12 23:15)
    「[Windows - まとめリンク] 目次: WindowsWindows XPのブリッジ機能colinuxとWindowsの...」
  • link 18年5月2日
    すずき (03/12 23:15)
    「[Windows 10クリーンインストール] 目次: Windows今までのノートPCは5分以上掛かっても起動できなかったのに...」
  • link 18年9月16日
    すずき (03/12 23:15)
    「[音が出なくなったよWindows 10] 目次: Windows昨日まで元気に動作していたのに、いつのまにかUSB接続のDA...」
  • link 24年9月20日
    すずき (03/12 23:13)
    「[Java - まとめリンク] 目次: JavaJavaのGUIライブラリSwingの本を買いましたSwingでウインドウ表示...」
  • link 14年1月26日
    すずき (03/12 23:13)
    「[Scalaの中間記法の優先度] 目次: JavaScalaとJavaでシフト演算子の優先度が違うのは、決して嫌がらせではなく...」
  • link 26年2月23日
    すずき (02/27 03:32)
    「[ドラクエ1リメイク、トロフィーコンプ] 目次: ゲームSteamでドラクエ1&2 HDリメイクを購入したまま完全放置でドラク...」
  • link 21年12月28日
    すずき (02/27 03:27)
    「[ゲーム - まとめリンク] 目次: ゲームNintendo DSを買ったパネルでポンDS最近の朝はパネポンDS聖剣伝説DSチ...」
link もっとみる

こんてんつ

open/close wiki
open/close Linux JM
open/close Java API

過去の日記

open/close 2002年
open/close 2003年
open/close 2004年
open/close 2005年
open/close 2006年
open/close 2007年
open/close 2008年
open/close 2009年
open/close 2010年
open/close 2011年
open/close 2012年
open/close 2013年
open/close 2014年
open/close 2015年
open/close 2016年
open/close 2017年
open/close 2018年
open/close 2019年
open/close 2020年
open/close 2021年
open/close 2022年
open/close 2023年
open/close 2024年
open/close 2025年
open/close 2026年
open/close 過去日記について

その他の情報

open/close アクセス統計
open/close サーバ一覧
open/close サイトの情報

合計:  counter total
本日:  counter today

link About www.katsuster.net
RDFファイル RSS 1.0

最終更新: 03/19 02:54