blog/content/post/when-pacman-says-error-required-key-missing-from-keyring.md

1.7 KiB

title date lastmod draft keywords description tags categories author comment toc autoCollapseToc postMetaInFooter hiddenFromHomePage contentCopyright reward mathjax mathjaxEnableSingleDollar mathjaxEnableAutoNumber hideHeaderAndFooter flowchartDiagrams sequenceDiagrams
When pacman says "error: required key missing from keyring" 2020-10-20T08:02:14+05:30 2022-04-06T08:02:14+05:30 false
pacman
pacman
linux
false false false true false false false false false false false
enable options
false
enable options
false
warning: Public keyring not found; have you run 'pacman-key --init'?
downloading required keys...
error: keyring is not writable
error: required key missing from keyring
error: failed to commit transaction (could not find or read file)
Errors occurred, no packages were upgraded.

This is what happened when I ran pacman -S zsh on my new WSL2 install.

I wasted a lot of time trying to fix this thing. I'll jump to the conclusion so you don't have to waste your time too. Entering these (as root) worked for me.

rm -r /etc/pacman.d/gnupg/
pacman-key --init
pacman-key --populate archlinux
pacman -Sc
pacman -Syyu

Read the thread here: https://bbs.archlinux32.org/viewtopic.php?id=522&p=2