我想通过以下方式升级我的 Arch Linux 发行版系统:
yay -Syu
但不幸的是,当我尝试导入新的 GPG 密钥时,出现了 DNS 错误
:: PGP keys need importing:
-> 8FD3D9A8D3800305A9FFF259D1742AD60D811D58, required by: spotify
==> Import? [Y/n] y
:: Importing keys with gpg...
dirmngr[1062283.5]: handler for fd 5 started
dirmngr[1062283.5]: DBG: chan_5 -> # Home: /home/pilec/.gnupg
dirmngr[1062283.5]: DBG: chan_5 -> # Config: [none]
dirmngr[1062283.5]: DBG: chan_5 -> OK Dirmngr 2.2.23 at your service
dirmngr[1062283.5]: connection from process 1067439 (1000:1000)
dirmngr[1062283.5]: DBG: chan_5 <- GETINFO version
dirmngr[1062283.5]: DBG: chan_5 -> D 2.2.23
dirmngr[1062283.5]: DBG: chan_5 -> OK
dirmngr[1062283.5]: DBG: chan_5 <- KS_GET -- 0x8FD3D9A8D3800305A9FFF259D1742AD60D811D58
dirmngr[1062283.5]: DBG: get_dns_cname(hkps.pool.sks-keyservers.net): No name
dirmngr[1062283.5]: DBG: dns: resolve_dns_name(hkps.pool.sks-keyservers.net): No name
dirmngr[1062283.5]: resolving 'hkps.pool.sks-keyservers.net' failed: No name
dirmngr[1062283.5]: DBG: Using TLS library: GNUTLS 3.6.15
dirmngr[1062283.5]: DBG: http.c:connect_server: trying name='hkps.pool.sks-keyservers.net' port=443
dirmngr[1062283.5]: DBG: get_dns_cname(hkps.pool.sks-keyservers.net): No name
dirmngr[1062283.5]: DBG: dns: resolve_dns_name(hkps.pool.sks-keyservers.net): No name
dirmngr[1062283.5]: resolving 'hkps.pool.sks-keyservers.net' failed: No name
dirmngr[1062283.5]: can't connect to 'hkps.pool.sks-keyservers.net': host not found
dirmngr[1062283.5]: error connecting to 'https://hkps.pool.sks-keyservers.net:443': No name
dirmngr[1062283.5]: command 'KS_GET' failed: No name
dirmngr[1062283.5]: DBG: chan_5 -> ERR 167772380 No name <Dirmngr>
gpg: keyserver receive failed: No name
dirmngr[1062283.5]: DBG: chan_5 <- BYE
dirmngr[1062283.5]: DBG: chan_5 -> OK closing connection
dirmngr[1062283.5]: handler for fd 5 terminated
但是,我能够从 dig 中获得正确的 DNS 响应:
dig hkps.pool.sks-keyservers.net
; <<>> DiG 9.16.8 <<>> hkps.pool.sks-keyservers.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10985
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;hkps.pool.sks-keyservers.net. IN A
;; ANSWER SECTION:
hkps.pool.sks-keyservers.net. 3555 IN A 209.244.105.201
;; Query time: 20 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Nov 25 23:58:01 CET 2020
;; MSG SIZE rcvd: 73
附加信息:
# cat /etc/resolv.conf
search home
nameserver 8.8.8.8
# cat /etc/nsswitch.conf
# Name Service Switch configuration file.
# See nsswitch.conf(5) for details.
passwd: files systemd
group: files systemd
shadow: files
publickey: files
hosts: files mymachines myhostname resolve [!UNAVAIL=return] dns
networks: files
protocols: files
services: files
ethers: files
rpc: files
netgroup: files
我忽略了什么?
答案1
最后我找到了一个解决方案,
spotify 软件包存在问题,可以通过 spotify 软件包讨论中的置顶评论解决 -https://aur.archlinux.org/packages/spotify/#pinned-747857
所以我跑了
curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | gpg --import -
现在一切都正常了!