10/22以降に"apt update"をするとmysql関連の警告とエラーが多数発生する
表題の通りだが、debian12, debian13 / ubuntu22.04, ubuntu24.04等でmysqlのリポジトリを登録している環境で "apt update"を実行すると以下のような警告とエラーが発生した。
Warning: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. OpenPGP signature verification failed: http://repo.mysql.com/apt/debian bookworm InRelease: Sub-process /usr/bin/sqv returned an error code (1), error message is: Signing key on BCA43417C3B485DD128EC6D4B7B3B788A8D3785C is bad: The primary key is not live because: Expired on 2025-10-22T17:26:50Z
Warning: http://repo.mysql.com/apt/debian/dists/bookworm/InRelease の取得に失敗しました Sub-process /usr/bin/sqv returned an error code (1), error message is: Signing key on BCA43417C3B485DD128EC6D4B7B3B788A8D3785C is bad: The primary key is not live because: Expired on 2025-10-22T17:26:50Z
Warning: いくつかのインデックスファイルのダウンロードに失敗しました。これらは無視されるか、古いものが代わりに使われます。
ChatGPT等に質問しても解決方法は提示されず
ChatGPT等のAIサービスで質問しても「GPGキーの期限が切れている」という当たり前の回答だけで解決できない。
不具合から2日後、10/24にようやくmysql公式(=Oracle)が修正版を公開
MySQL Bugs: #119212: Expired GPG signature key for package repository
具体的な修正手順
※既にGPG鍵がインストール済みの場合
debファイルをダウンロード
cd /tmp
wget https://dev.mysql.com/get/mysql-apt-config_0.8.35-1_all.deb
修正版をインストール
sudo apt install ./mysql-apt-config_0.8.35-1_all.deb
※選択画面が表示されるので「OK」を選択してEnter
aptでエラーが発生しない事を確認する
sudo apt update
以上でgpg鍵の不具合が解決した。
※GPGが未インストールの場合は、古いバージョンのGPGキーをインストールしてから新しいGPGキーをインストールする
cd /tmp
wget https://dev.mysql.com/get/mysql-apt-config_0.8.32-1_all.deb
sudo apt install ./mysql-apt-config_0.8.32-1_all.deb
この後で 新しいGPGのインストール を行う。
