alfort's Blog

Linuxエンジニアのメモ

CentOS 8からCentOS 8 Streamへの移行

概要

CentOS 8からCentOS 8 Streamへ移行するにあたって躓いたのでそのメモ。

CentOS 8からCentOS 8 Streamへの移行手順

以下のCentOS StreamのWebサイトによると、CentOS上で次のようなコマンドを打てばよいらしい。

www.centos.org

dnf --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos
dnf distro-sync

起きたエラー

手順はCentOS 8のリポジトリを無効にしたうえで、新しいCentOS 8 Streamのリポジトリを有効化するもの。 ただ以下のように、GPG鍵のパッケージが見つからずリポジトリの入れ替えがうまくいかなかった。

$ sudo dnf --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos
CentOS-8 - Extras                                                                                                                                          253  B/s | 1.5 kB     00:06
CentOS-8 - Extras                                                                                                                                          7.1 kB/s |  10 kB     00:01
No match for argument: centos-linux-repos
削除対象のパッケージはありません。
エラー:
 問題: conflicting requests
 - nothing provides centos-gpg-keys = 1:8-3.el8 needed by centos-stream-repos-8-3.el8.noarch
(インストール不可のパッケージをスキップするには、'--skip-broken' を追加してみてください または、'--nobest' を追加して、最適候補のパッケージのみを使用しないでください)

対処方法

以下のようにして足りないパッケージをインストールしたところ、移行がうまくできた。

$ sudo dnf --disablerepo=\* update https://vault.centos.org/8.5.2111/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-3.el8.noarch.rpm

参考にしたウェブサイトなど

www.centos.org

forums.centos.org