Package Signing Key invalid or corrupted database (PGP signature) archlinux 签名异常解决

错误异常

sudo pacman -S yay
error: wslutilities: signature from "WSL Utilities Package Signing Key <contact@wslutiliti.es>" is unknown trust
error: could not register 'sublime-text' database (database already registered)
error: database 'wslutilities' is not valid (invalid or corrupted database (PGP signature))

原因官方解释

https://wiki.archlinux.org/title/Pacman/Package_signing#Adding_unofficial_keys

解决办法

步骤1.编辑/etc/pacman.conf

SigLevel = Never
#LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

尝试装应用发现还有异常

error: could not register 'sublime-text' database (database already registered)

步骤2 参照如下 解决

https://wiki.manjaro.org/index.php/Pacman_troubleshooting#Errors_about_Keys

  1. Remove old (and possibly broken) keys by entering this command:
sudo rm -r /etc/pacman.d/gnupg
  1. Initialize the pacman keyring:
sudo pacman-key --init
  1. Download the packages:

Info
GPG check errors can be ignored, since it only downloads the keyring packages.

Those running ARM may also need to download archlinuxarm-keyring and manjaro-arm-keyring.

mkdir -pv $HOME/.cache/pkg/ && sudo pacman -Syw archlinux-keyring manjaro-keyring --cachedir $HOME/.cache/pkg/
  1. Remove the signatures:

Info
Signatures must be removed to avoid the automatic check of the packages.

rm -f $HOME/.cache/pkg/*.sig
  1. Install the downloaded packages manually:

Info
This will also trigger the populate process.

sudo pacman -U $HOME/.cache/pkg/*.tar.zst
sudo pacman -U $HOME/.cache/pkg/*.tar.xz
  1. Clear out the software packages downloaded during the aborted installation (optional):

Warning
The above command clears the pacman cache completely, and one will not be able to downgrade to a previous version of a package if required. Instead packages that are causing signing errors can be removed individually when upgrading.

sudo pacman -Sc
  1. Remove the custom package folder: (optional):
sudo rm -Rf $HOME/.cache/pkg/

还有异常 检查/etc/pacman.conf文件多了sublime-text 删除

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容