当我最终决定升级运行原版 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 吗?我该如何解决这个问题?
谢谢!
删除然后更新
在终端中
- $
sudo rm -R /var/lib/pacman/sync
- $
sudo pacman -Syu
以下内容对我有用。
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
时,一切正常。
我做到了:
首先确保[sudo vim /etc/pacman.d/mirrorlist]
中的第一个镜像已列入白名单,然后:
sudo rm -R /var/lib/pacman/sync
如果您使用 e2guardian(或类似工具(,请确保在 [examplef1.story]
中未启用">SSL 一揽子阻止"。 并在末尾:
sudo pacman-key --init
sudo pacman-key --populate archlinux
sudo -E pacman -Syu
sudo pacman -Syyu
资料来源: bbs.archlinux.org:
我根据这里和其他一些论坛的所有建议制作了一个小脚本。希望这有助于另一个挣扎的灵魂修复。
#!/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
首先,当你启用了自定义存储库(archlinuxfr、xorg116、catalyst(时,你运行的不是"vanilla Arch Linux"。您可以在/etc/pacman.conf
中禁用它们
关于您的问题,您很可能没有安装存储库所需的密钥。您可以通过 pacman-key -r Key-ID
启用已签名的非官方用户存储库。如果这不起作用,您也可以禁用检查签名。
另请参阅 AMD Catalyst 了解更多信息。