I was installing minecraft launcher via pacman when this happened:
error: minecraft-launcher: signature from “lilac (build machine) lilac@build.archlinuxcn.org” is unknown trust
:: File /var/cache/pacman/pkg/minecraft-launcher-1:1.0.1221-3-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] y
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.
I tried doing:
pacman-key --init
pacman-key --populate archlinux endeavouros
and also trying yay but it doesn’t work.
Can anyone help?
pacman-key depends on system time. If your system clock is not synchronized, system installation/upgrade may fail with:
error: PackageName: signature from “User email@archlinux.org” is invalid error: failed to commit transaction (invalid or corrupted package (PGP signature)) Errors occurred, no packages were upgraded.
If using ntpd, correct the system time (as root) with ntpd -qg followed by hwclock -w.
If correction of the system clock does not resolve the failure, try one of the following approaches:
Removing packages from cache
Some packages could be corrupted or may be unsigned, causing failure. Remove each offending package from the system cache rm /var/cache/pacman/pkg/pkgname so it gets freshly downloaded, or clear the entire cache.
Resetting all the keys
Remove or reset all the keys installed in your system by removing the /etc/pacman.d/gnupg directory (as root) and by rerunning pacman-key --init followed by pacman-key --populate to re-add the default keys.