DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=17.1.6
DISTRIB_CODENAME=哈科伊拉
我今天在一台旧笔记本电脑上安装了 manjaro,并且正在尝试更新它。
只是使用pacman -Syyu
最终给了我
(383/383) checking keys in keyring
downloading required keys...
:: Import PGP Key KEY, "Brad Fanella <[email protected]>",
created: 2018-03-2? [Y/n] Y
error: key "Brad Fanella <[email protected]>" could not be imported
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
我尝试了这个顺序,但没有成功:
sudo pacman-key --init
sudo pacman-key --populate archlinux manjaro
sudo pacman-key --refresh-keys
sudo pacman -Syy
sudo pacman -S manjaro-keyring archlinux-keyring
sudo pacman -Syyu
有任何想法吗?
编辑1
尝试pacman-key --recv-keys F382BBBD
并得到了这个:
gpg: key 81A402D4F382BBBD was created 6 days in the future (time warp or clock problem)
gpg: key 81A402D4F382BBBD: no valid user IDs
gpg: this may be caused by a missing self-signature
gpg: Total number processed: 1
gpg: w/o user IDs: 1
答案1
解决了。
从编辑1输出,
我使用更新了时钟sudo ntpdate -vu time.nist.gov
然后pacman-key --recv-keys F382BBBD
瞧。
这简单得令人恼火。
答案2
以下内容适用于 archlinux,但也适用于其他 Linux 发行版。要更正无效的 KEY,需要执行以下操作:
rm -fr /etc/pacman.d/gnupg
pacman-key --init
pacman-key --populate archlinux
假设抛出错误的关键在 Blackarch 中,那么还需要:
sudo pacman-key --populate blackarch
最后
sudo pacman -Sy archlinux-keyring
sudo pacman-key --populate archlinux
sudo pacman-key --refresh-keys