Software development of explosion! -夢の破片(カケラ)たちの日々-

ソフトウェア開発を中心としたコンピューター関連のネタを扱ったブログです

Software development is passion and explosion!

ArchLinux で error: required key missing from keyring が出た場合の keyring の更新方法

ArchLinux を長い間起動せずにおくと、pacman で使用する証明書が失効してしまって、 pacman -Syu

:: Import PGP key 3B94A80E50A477C7, "Jan Alexander Steffens (heftig) <heftig@archlinux.org>"? [Y/n] 
error: key "3B94A80E50A477C7" could not be looked up remotely
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

といったエラーで pacman -Syu が失敗する。

archlinux-keyring パッケージを更新して、 pacman -Syu が期待通りに動作するようにする対策手順を記載する。

sudo -s
pacman-key --init 
pacman-key --populate
pacman-key --refresh-keys
pacman -Sy archlinux-keyring

pacman-key --refresh-keys でエラーが出ても、 pacman -Sy archlinux-keyring が成功すれば、その後は pacman -Syu が期待通りに動作するようになる。

bbs.archlinux.org