GPG and pacman errors are annoying

So, I was trying ungleich.ch’s IPv6 VPS. It is apparently cheap, and I wanted to host a Matrix server of some sort. It does come preinstalled with Arch Linux, which is good. That means I can get the latest software without relying Docker.

However, it apparently comes with an outdated copy of Arch Linux. The kernel version is 4.19, while an up-to-date kernel should be 5.12. What the heck.

Usually this is quite easy to fix, just a quick sudo pacman -Syyu should do it. But no. This outdated Arch Linux refuses simplicity. When I attempted to run pacman, it downloaded all packages, and then warned something about

invalid or corrupted package (PGP signature)

This is not good, and usually means something happened to the key server. So I tried everything to update the keyring, which failed to work.

After scratching my head for 12 million years, I remembered reading about pacman switching from xz to zstd two years ago. It might be possible that the pacman version is too old to support zstd at all.

This is easy to fix though. Just download a statically linked version of pacman should do the work.

How to fix outdated Pacman error

Just download a static pacman and update the system with that.

wget https://pkgbuild.com/~eschwartz/repo/x86_64-extracted/pacman-static
chmod +x pacman-static
sudo ./pacman-static -Syyu

Now your Arch system is magically up-to-date. Happy Arching!