translated

This commit is contained in:
geekpi 2023-05-24 09:03:27 +08:00
parent fb060c28d0
commit 3be76a1e6f
2 changed files with 62 additions and 61 deletions

View File

@ -1,61 +0,0 @@
[#]: subject: "Fix “invalid or corrupted package (PGP signature)” Error In Arch Linux"
[#]: via: "https://www.debugpoint.com/invalid-corrupted-package-arch/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
Fix “invalid or corrupted package (PGP signature)” Error In Arch Linux
======
**A simple guide to fix the “invalid or corrupted package” error in Arch Linux.**
I have a few Arch Linux systems in both physical and VM setup, which I access when needed. After almost two months, when I tried to upgrade the Arch Linux in one of them using `sudo pacman -Syu`, I got hundreds of errors like this:
![Sample invalid or corrupted package error in Arch Linux][1]
The problem is when you get the above error, you can not upgrade/update your Arch system. Even if you sync the mirrors or get a faster one. So, if you run `sudo pacman -Syyu`, the error will still be there. This is also problematic since you cant install any additional packages until this is fixed.
### Cause
When you install or upgrade packages on an Arch Linux system, pacman checks the digital signatures of the packages against the keys in the `archlinux-keyring` package. This verification process ensures that the packages you download and install are unmodified and come from trusted sources.
It contains the public keyring used to [verify the authenticity and integrity of packages][2] and in pacman. The `archlinux-keyring` package is regularly updated by the Arch Linux developers to include new trusted keys and revoke any compromised keys.
If you have not updated your Arch Linux system for a longer period, then the digital signatures of various packages may mismatch. The changed keys may not match what you have in your system.
Hence the error.
### Fix
To fix “invalid or corrupted package (PGP signature)” error in Arch Linux, you need to install/update the `archlinux-keyring` package from the `Core` repo. Run the following from the terminal:
```
sudo pacman -S archlinux-keyring
```
After the above command is complete, run the upgrade:
```
sudo pacman -Syu
```
This will resolve the problem, and you can continue your normal activity in Arch Linux. Its recommended to always keep the `archlinux-keyring` package up to date to maintain the security and integrity of your Arch Linux system.
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/invalid-corrupted-package-arch/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed/
[1]: https://www.debugpoint.com/wp-content/uploads/2023/05/Sample-invalid-or-corrupted-package-error-in-Arch-Linux.jpg
[2]: https://wiki.archlinux.org/title/Pacman/Package_signing

View File

@ -0,0 +1,62 @@
[#]: subject: "Fix “invalid or corrupted package (PGP signature)” Error In Arch Linux"
[#]: via: "https://www.debugpoint.com/invalid-corrupted-package-arch/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "geekpi"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
修复 Arch Linux 中的 “invalid or corrupted package (PGP signature)” 错误
======
**修复 Arch Linux 中 “invalid or corrupted package” 错误的简单指南。**
I have a few Arch Linux systems in both physical and VM setup, which I access when needed. Aft
我在物理和 VM 都安装有一些 Arch Linux 系统,我会在需要时访问它们。将近两个月后,当我尝试使用 `sudo pacman -Syu` 升级其中一个中的 Arch Linux 时,我遇到了数百个这样的错误:
![Arch Linux 中无效或损坏的包错误示例][1]
问题是当你遇到上面的错误时,你无法升级/更新你的 Arch 系统。即使你同步镜像或获得更快的镜像。所以,如果你运行 `sudo pacman -Syyu`,错误仍然存在。这也是有问题的,因为在修复此问题之前你无法安装任何其他软件包。
### 原因
当你在 Arch Linux 系统上安装或升级软件包时pacman 会根据 `archlinux-keyring` 软件包中的密钥检查软件包的数字签名。此验证过程可确保你下载和安装的软件包未经修改且来自受信任的来源。
它包含用于[验证包的真实性和完整性][2]和 pacman 中的 keyring。`archlinux-keyring` 包由 Arch Linux 开发人员定期更新,以包含新的可信密钥并撤销任何泄露的密钥。
如果你的 Arch Linux 系统很长时间没有更新,那么各种包的数字签名可能会不匹配。更改后的密钥可能与你系统中的密钥不匹配。
因此错误了。
### 修复
要修复 Arch Linux 中的 “invalid or corrupted package (PGP signature)” 错误,你需要从 `Core` 仓库安装/更新 `archlinux-keyring` 包。从终端运行以下命令:
```
sudo pacman -S archlinux-keyring
```
上述命令完成后,运行升级:
```
sudo pacman -Syu
```
这将解决问题,你可以在 Arch Linux 中继续你的正常活动。建议始终保持 `archlinux-keyring` 包为最新,以维护 Arch Linux 系统的安全性和完整性。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/invalid-corrupted-package-arch/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed/
[1]: https://www.debugpoint.com/wp-content/uploads/2023/05/Sample-invalid-or-corrupted-package-error-in-Arch-Linux.jpg
[2]: https://wiki.archlinux.org/title/Pacman/Package_signing