Home  >  Article  >  Operation and Maintenance  >  Fix “invalid or corrupted package (PGP signature)” error in Arch Linux

Fix “invalid or corrupted package (PGP signature)” error in Arch Linux

WBOY
WBOYforward
2023-06-09 11:37:421403browse

修复 Arch Linux 中的 “invalid or corrupted package (PGP signature)” 错误

I have a few Arch Linux systems installed in both physical and virtual machines that I access when needed. Nearly two months later, when I tried to upgrade Arch Linux in one of them using sudo pacman -Syu , I encountered hundreds of errors like this:

修复 Arch Linux 中的 “invalid or corrupted package (PGP signature)” 错误

Invalid or Corrupted Package Error Example in Arch Linux

The problem is that when you encounter the above error, you cannot upgrade/update your Arch system. Even if you synchronize mirrors or get faster mirrors. So, if you run sudo pacman -Syyu, the error still exists. This creates difficulties because you cannot install any other packages until this problem is fixed.

Cause

When you install or upgrade a software package on an Arch Linux system, pacman will check the number of the software package against the key in the archlinux-keyring sign. This verification process ensures that the packages you download and install are unmodified and come from a trusted source.

It contains the keyring used to verify the authenticity and integrity of the package and pacman. archlinux-keyring Packages are regularly updated by Arch Linux developers to include new trusted keys and revoke any leaked keys.

If you have not updated your Arch Linux system for a long time, the digital signatures of various software packages may be inconsistent. The changed key may not match the key on your system.

So an error occurred.

Fix

To fix the "invalid or corrupted package (PGP signature)" error in Arch Linux, you need to install/update from the Core repository archlinux- keyring package. Run the following command from the terminal:

sudo pacman -S archlinux-keyring

Once the above command is completed, run upgrade:

sudo pacman -Syu

This will resolve the issue and you can continue your normal activities in Arch Linux. It is recommended to always keep the archlinux-keyring package up to date to maintain the security and integrity of your Arch Linux system.

The above is the detailed content of Fix “invalid or corrupted package (PGP signature)” error in Arch Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:51cto.com. If there is any infringement, please contact admin@php.cn delete