Arch Linux 系统更新:错误:GPGME 错误:无数据

问题描述 投票:0回答:5

当我最终决定升级运行 vanilla Arch Linux 的笔记本电脑时(由于互联网问题),我不断收到这样的错误:

$ sudo pacman -Syu
:: Synchronizing package databases...
 core                     126.8 KiB   125K/s 00:01 [######################] 100%
 extra                   1639.9 KiB   221K/s 00:07 [######################] 100%
 community                  4.2 MiB   169K/s 00:26 [######################] 100%
 multilib                 168.6 KiB   169K/s 00:01 [######################] 100%
 archlinuxfr               11.5 KiB  0.00B/s 00:00 [######################] 100%
 xorg116                    6.3 KiB  20.5K/s 00:00 [######################] 100%
 xorg116.sig                6.3 KiB  0.00B/s 00:00 [######################] 100%
error: GPGME error: No data
error: failed to update xorg116 (invalid or corrupted database (PGP signature))
 catalyst                   6.3 KiB  0.00B/s 00:00 [######################] 100%
 catalyst.sig               6.4 KiB  0.00B/s 00:00 [######################] 100%
error: GPGME error: No data
error: failed to update catalyst (invalid or corrupted database (PGP signature)) 
error: database 'xorg116' is not valid (invalid or corrupted database (PGP signature))
error: database 'catalyst' is not valid (invalid or corrupted database (PGP signature))  

因为网络问题,我将近一个月或更长时间没有更新/升级。我尝试了人们建议在其他网站上做的所有事情,包括堆栈溢出,但没有一个奏效。

我尝试了什么:

$ sudo pacman -Rdd catalyst                             47.6s  Fri 21:44
error: GPGME error: No data
error: GPGME error: No data
error: target not found: catalyst

$ sudo pacman -Syu                                              Fri 21:44
error: GPGME error: No data
error: GPGME error: No data
**and the same thing as "$ sudo pacman -Syu"**

This is also the same output for $ sudo pacman -Syy

我也试过了

$ sudo pacman -Scc
$ sudo pacman-key --init
$ sudo pacman-key --populate archlinux                     1394ms  Fri 
==> Appending keys from archlinux.gpg...
==> Locally signing trusted keys in keyring...
  -> Locally signing key DDB867B92AA789C165EEFA799B729B06A680C281...
  -> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8...
  -> Locally signing key 91FFE0700E80619CEB73235CA88E23E377514E00...
  -> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7...
  -> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2...
 ==> Importing owner trust values...
==> Disabling revoked keys in keyring...
  -> Disabling key 7FA647CD89891DEDC060287BB9113D1ED21E1A55...
  -> Disabling key D4DE5ABDE2A7287644EAC7E36D1A9E70E19DAA50...
  -> Disabling key 40440DC037C05620984379A6761FAD69BA06C6A9...
  -> Disabling key B1F2C889CB2CCB2ADA36D963097D629E437520BD...
  -> Disabling key BC1FBE4D2826A0B51E47ED62E2539214C6C11350...
  -> Disabling key 63F395DE2D6398BBE458F281F2DBB4931985A992...
  -> Disabling key 8F76BEEA0289F9E1D3E229C05F946DED983D4366...
  -> Disabling key 4FCF887689C41B09506BE8D5F3E1D5C5D30DB0AD...
  -> Disabling key 81D7F8241DB38BC759C80FCE3A726C6170E80477...
  -> Disabling key 5E7585ADFF106BFFBBA319DC654B877A0864983E...
  -> Disabling key E7210A59715F6940CF9A4E36A001876699AD6E84...
  -> Disabling key F5A361A3A13554B85E57DDDAAF7EF7873CFD4BB6...
  -> Disabling key 8CF934E339CAD8ABF342E822E711306E3C4F88BC...
  -> Disabling key 5696C003B0854206450C8E5BE613C09CB4440678...
  -> Disabling key 9515D8A8EAB88E49BB65EDBCE6B456CAF15447D5...
  -> Disabling key 4A8B17E20B88ACA61860009B5CED81B7C2E5C0D2...
  -> Disabling key 0B20CA1931F5DA3A70D0F8D2EA6836E1AB441196...
  -> Disabling key 34C5D94FE7E7913E86DC427E7FB1A3800C84C0A5...
  -> Disabling key 39F880E50E49A4D11341E8F939E4F17F295AFBF4...
  -> Disabling key 66BD74A036D522F51DD70A3C7F2A16726521E06D...
  -> Disabling key 44D4A033AC140143927397D47EFD567D4C7EA887...
  -> Disabling key 27FFC4769E19F096D41D9265A04F9397CDFD6BB0...
==> Updating trust database...
gpg: next trustdb check due at 2018-06-25

但没有任何效果,根本没有任何变化。
有人知道为什么会这样吗?会不会是我这么久没更新 Arch Linux 的缘故?我该如何解决这个问题?

谢谢!

linux archlinux pacman-package-manager
5个回答
39
投票

删除然后更新

在航站楼

  1. $
    sudo rm -R /var/lib/pacman/sync
  2. $
    sudo pacman -Syu

2
投票

我做了:
首先确保

[sudo vim /etc/pacman.d/mirrorlist]
中的第一个镜像被列入白名单,然后:

sudo rm -R /var/lib/pacman/sync

如果您使用e2guardian(或类似工具),请确保在[examplef1.story]中未启用“

blanket block for SSL
”。最后:

sudo pacman-key --init

sudo pacman-key --populate archlinux

sudo -E pacman -Syu

sudo pacman -Syyu

来源: bbs.archlinux.org


2
投票

以下对我有用。

sudo rm -rf /etc/pacman.d/gnupg /var/lib/pacman/sync
sudo pacman-key --init 
sudo pacman -Syyu

最后一个命令命中错误在

checking keys in keyring

error: key "6D42BDD116E0068F" could not be looked up remotely
error: required key missing from keyring
error: failed to commit transaction (unexpected error)

我们必须更新

archlinux-keyring
包来补救这个

sudo pacman -S archlinux-keyring

然而,这就出现了先有鸡还是先有蛋的问题。我们需要该包来验证其他包,但它自己的包现在也已过时。以上命令下载

archlinux-keyring-yyymmdd.pkg.tar.zst
;无法验证,拒绝它。有一个关于失败的提示问题,之后无论答案如何,下载的包都会被删除。

没有回答提示,我打开另一个终端窗口并复制下载的包。关闭之前终端中的提示并手动安装复制的包。

cp /var/cache/pacman/pkg/archlinux-keyring-20220713-1-any.pkg.tar.zst ~/tmp/
sudo pacman -U ~/tmp/archlinux-keyring-20220713-1-any.pkg.tar.zst

现在我去的时候一切正常

sudo pacman -Syu
像往常一样。


2
投票

我根据这里和其他一些论坛的所有建议制作了一个小脚本。希望这能帮助另一个苦苦挣扎的灵魂。

    #!/bin/sh
echo "::file: /usr/local/bin/fix-gpme-arch.sh"
    echo "Thanks to folks at https://stackoverflow.com/questions/48117783/arch-linux-system-update-error-gpgme-error-no-data and other forums"
    echo "#######"
    echo ""
    echo ""
    echo ":: Script to fix GPME error"
    echo ""
    sleep 1
    
    echo "Remove files: /etc/pacman.d/gnupg and /var/lib/pacman/sync"
    echo ""
    sudo rm -rfv /etc/pacman.d/gnupg /var/lib/pacman/sync
    sleep 1
    
    echo ""
    echo "Reinitialize pacman keys"
    echo ""
    echo ":: pacman-key --init"
    echo ""
    sudo pacman-key --init 
    echo ""
    echo ":: pacman-key --populate archlinux"
    echo ""
    sudo pacman-key --populate archlinux
    echo ""
    sleep 1
    
    echo "Update pacman database"
    echo ""
    echo ":: pacman -Fyy"
    echo ""
    sudo pacman -Fyy
    echo ""
    echo "::sudo -E pacman -Syu"
    sudo -E pacman -Syu
    echo ""
    echo ":: pacman -Syyu"
    echo ""
    sudo pacman -Syyu
    echo ""
    sleep 1
    
    echo "GPME fix error done"
    echo ""
    echo "If you see further errors, suggest running: pacman -S archlinux-keyring"
    echo ""
    
    exit 0

1
投票

首先,当您启用了自定义存储库(archlinuxfr、xorg116、catalyst)时,您并没有运行“vanilla Arch Linux”。您可以在

/etc/pacman.conf

中禁用它们

关于您的问题,您很可能没有安装存储库所需的密钥。您可以通过

pacman-key -r Key-ID
启用已签名的非官方用户存储库。如果这不起作用,您也可以禁用检查签名。

另见AMD Catalyst了解更多信息。

© www.soinside.com 2019 - 2024. All rights reserved.