shinke1987.net
雑多な備忘録等のはず。
他のカテゴリ・タブ
目次
PR

dnfでcheck-updateすると404エラー

2026-02-21 2026-02-21

環境

前提

下記コマンドでアップデートを確認しようとすると、エラーが出た。

$ sudo dnf check-update

エラー内容は下記の通り。

PostgreSQL 12 for RHEL / Rocky / AlmaLinux 9 - x86_64 437 B/s | 146 B 00:00 

Errors during downloading metadata for repository 'pgdg12':

- Status code: 404 for https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-9-x86_64/repodata/repomd.xml (IP: 199.232.151.52)

エラー: repo 'pgdg12' のメタデータのダウンロードに失敗しました : Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

無効なものを含むリポジトリ一覧を下記コマンドで表示する。

$ dnf repolist --all

上記コマンド実行後に表示された、PostgreSQL関連で追加されたリポジトリは下記の通りだった。

pgdg-common                          PostgreSQL common RPMs for RHEL / Rocky / AlmaLinux 9 - x86_64                                          有効化
pgdg-common-debuginfo                PostgreSQL common RPMs for RHEL / Rocky / AlmaLinux 9 - x86_64 - Debuginfo                              有効化
pgdg-common-srpm-testing             PostgreSQL common testing SRPMs for RHEL / Rocky / AlmaLinux 9 - x86_64                                 無効化
pgdg-common-testing                  PostgreSQL common testing RPMs for RHEL / Rocky / AlmaLinux 9 - x86_64                                  無効化
pgdg-rhel9-extras                    Extra packages to support some RPMs in the PostgreSQL RPM repo RHEL / Rocky / AlmaLinux 9 - x86_64      無効化
pgdg-rhel9-sysupdates                PostgreSQL Supplementary ucommon RPMs for RHEL / Rocky / AlmaLinux 9 - x86_64                           無効化
pgdg-source-common                   PostgreSQL 12 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Source                                          無効化
pgdg12                               PostgreSQL 12 for RHEL / Rocky / AlmaLinux 9 - x86_64                                                   有効化
pgdg12-debuginfo                     PostgreSQL 12 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Debuginfo                                       無効化
pgdg12-source                        PostgreSQL 12 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Source                                          無効化
pgdg12-source-updates-testing        PostgreSQL 12 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Source update testing                           無効化
pgdg12-updates-testing               PostgreSQL 12 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Updates testing                                 無効化
pgdg12-updates-testing-debuginfo     PostgreSQL 12 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Debuginfo                                       無効化
pgdg13                               PostgreSQL 13 for RHEL / Rocky / AlmaLinux 9 - x86_64                                                   有効化
pgdg13-debuginfo                     PostgreSQL 13 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Debuginfo                                       無効化
pgdg13-source                        PostgreSQL 13 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Source                                          無効化
pgdg13-source-updates-testing        PostgreSQL 13 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Source updates testing                          無効化
pgdg13-updates-testing               PostgreSQL 13 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Updates testing                                 無効化
pgdg13-updates-testing-debuginfo     PostgreSQL 13 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Debuginfo                                       無効化
pgdg14                               PostgreSQL 14 for RHEL / Rocky / AlmaLinux 9 - x86_64                                                   有効化
pgdg14-debuginfo                     PostgreSQL 14 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Debuginfo                                       無効化
pgdg14-source                        PostgreSQL 14 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Source                                          無効化
pgdg14-source-updates-testing        PostgreSQL 14 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Source updates testing                          無効化
pgdg14-updates-testing               PostgreSQL 14 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Updates testing                                 無効化
pgdg14-updates-testing-debuginfo     PostgreSQL 14 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Debuginfo                                       無効化
pgdg15                               PostgreSQL 15 for RHEL / Rocky / AlmaLinux 9 - x86_64                                                   有効化
pgdg15-debuginfo                     PostgreSQL 15 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Debuginfo                                       無効化
pgdg15-source                        PostgreSQL 15 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Source                                          無効化
pgdg15-source-updates-testing        PostgreSQL 15 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Source updates testing                          無効化
pgdg15-updates-testing               PostgreSQL 15 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Updates testing                                 無効化
pgdg15-updates-testing-debuginfo     PostgreSQL 15 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Debuginfo                                       無効化
pgdg16                               PostgreSQL 16 for RHEL / Rocky / AlmaLinux 9 - x86_64                                                   有効化
pgdg16-debuginfo                     PostgreSQL 16 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Debuginfo                                       無効化
pgdg16-source                        PostgreSQL 16 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Source                                          無効化
pgdg16-source-updates-testing        PostgreSQL 16 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Source updates testing                          無効化
pgdg16-updates-testing               PostgreSQL 16 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Updates testing                                 無効化
pgdg16-updates-testing-debuginfo     PostgreSQL 16 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Debuginfo                                       無効化
pgdg17-source-updates-testing        PostgreSQL 17 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Source updates testing                          無効化
pgdg17-updates-testing               PostgreSQL 17 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Updates testing                                 無効化
pgdg17-updates-testing-debuginfo     PostgreSQL 17 for RHEL / Rocky / AlmaLinux 9 - x86_64 - Debuginfo                                       無効化

エラー原因

確認のために上記のhttpsで始まるURLにWebブラウザでアクセスすると404だった。
https://www.postgresql.org/support/versioning

上記ページを確認すると、2026年2月21日時点で、PostgreSQLのv13以下はサポートされていないらしい。

なのでリポジトリも削除されたと思われる。

下記のリポジトリを無効化すれば解決しそうなので、無効化する。

対応

下記コマンドでリポジトリを無効化する。

(config-managerは過去にインストール済み)

$ sudo dnf config-manager --disable pgdg12 pgdg13

下記コマンドでpgdg12とpgdg13が表示されなければ、無効化できている。

$ dnf repolist

結果

dnfのcheck-updateコマンドは正常に完了するようになった。

同一カテゴリの記事