manjaro-更新报错-signature-unknown-trust,关联

1
2
3
4
5
error: archlinux-keyring: signature from "Christian Hesse (Arch Linux Package Signing) <arch@eworm.de>" is unknown trust
:: File /var/cache/pacman/pkg/archlinux-keyring-20221123-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] 
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.

解决办法

  1. 修改 pacman 设置,先不要检查签名
    1. 修改 sudo vi /etc/pacman.conf
    2. [options] 部分,SigLevel 改为 Optional TrustAll
  2. 重建 keyring
    1
    2
    3
    4
    5
    6
    7
     sudo rm -r /etc/pacman.d/gnupg
     sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring
     sudo pacman-key --init
     sudo pacman-key --populate archlinux manjaro
     # refresh-keys 这一步等挺长时间的
     sudo pacman-key --refresh-keys 
     sudo pacman -Sc
    
  3. 为了安全 SigLevel 改为 Required DatabaseOptional
  4. 更新系统 sudo pacman -Syyu