吃豆人的问题 - 在过去的几个月里一直失败

吃豆人的问题 - 在过去的几个月里一直失败

我在更新 Artix(基于 Arch)Linux 时遇到问题。

我使用这些命令来获取最新的镜像列表并启动 pacman:

% sudo pacman -U ./artix-mirrorlist-20221209-1-any.pkg.tar.zst
% sudo mv /etc/pacman.d/mirrorlist.pacnew /etc/pacman.d/mirrorlist
% sudo pacman -Sy --needed archlinux-keyring
% sudo pacman -Syyu

这在过去总是成功的,但在过去的几个月里,这是我得到的输出:

100  100k  100  100k    0     0   401k      0 --:--:-- --:--:-- --:--:--  402k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  471k  100  471k    0     0  1366k      0 --:--:-- --:--:-- --:--:-- 1370k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 40781  100 40781    0     0   188k      0 --:--:-- --:--:-- --:--:--  188k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  119k  100  119k    0     0   447k      0 --:--:-- --:--:-- --:--:--  449k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3975k  100 3975k    0     0   803k      0  0:00:04  0:00:04 --:--:--  649k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
....

这样的情况持续了很长一段时间。

然后这就是我的要求:

100 3040k  100 3040k    0     0  4355k      0 --:--:-- --:--:-- --:--:-- 4355k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 52477  100 52477    0     0   249k      0 --:--:-- --:--:-- --:--:--  251k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  237k  100  237k    0     0   817k      0 --:--:-- --:--:-- --:--:--  819k
 Total (   0/1193)                                                                                1969.9 MiB   482 KiB/s 69:44 [----------------------------------------------------------------------------] 100%
(1193/1193) checking keys in keyring                                                                                           [----------------------------------------------------------------------------] 100%
(1193/1193) checking package integrity                                                                                         [----------------------------------------------------------------------------] 100%
error: archlinux-keyring: signature from "Dudemanguy <[email protected]>" is unknown trust
:: File /var/cache/pacman/pkg/archlinux-keyring-20220927-1.1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: coin: signature from "Alexander F. Rødseth <[email protected]>" is marginal trust
:: File /var/cache/pacman/pkg/coin-4.0.0.04c190-4-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: med-openmpi: signature from "Alexander F. Rødseth <[email protected]>" is marginal trust
:: File /var/cache/pacman/pkg/med-openmpi-4.1.1-2-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: python-pivy: signature from "Alexander F. Rødseth <[email protected]>" is marginal trust
:: File /var/cache/pacman/pkg/python-pivy-0.6.8-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: libreoffice-fresh: signature from "Dudemanguy <[email protected]>" is unknown trust
:: File /var/cache/pacman/pkg/libreoffice-fresh-7.4.1-3-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.

我尝试对这些问题给出不同的答案,但结果总是相同的。

我究竟做错了什么?

答案1

您的密钥环已过时,没有它,包裹将无法验证。一般来说,在升级之前,请确保您首先获得最新的 archlinux-keyring:

% sudo pacman -Sy --needed archlinux-keyring
% sudo pacman -Su

始终立即运行一个,以避免部分升级。

您也可以以pacman-key --refresh-keyroot 身份执行此操作,但密钥服务器往往比安装最新archlinux-keyring软件包更容易出错。

相关内容