gpg: 키 서버 수신 실패: 서버 표시 실패

gpg: 키 서버 수신 실패: 서버 표시 실패

gns 저장소를 추가하고 다음 명령을 사용하려고 하면 이 오류가 발생합니다.

#sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F88F6D313016330404F710FC9A2FD067A2E3EF7B

오류는 다음과 같습니다

gpg: keyserver receive failed: Server indicated a failure

답변1

방화벽 뒤에서는 기본 포트 11371 대신 포트 80을 사용해야 합니다.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9A2FD067A2E3EF7B

예제 출력:

Executing: /tmp/apt-key-gpghome.mTGQWBR2AG/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 9A2FD067A2E3EF7B
gpg: key 9A2FD067A2E3EF7B: "Launchpad PPA for GNS3" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

답변2

이 문제는 나에게 정말 어려웠습니다. 이 문제를 발견하기 전까지는 제안된 솔루션 중 어느 것도 효과가 없었습니다.레딧에 게시하세요. 방금 다음 줄을 추가했습니다 /etc/resolv.conf.

nameserver 8.8.8.8 # Google DNS

다른 DNS를 사용해 보고 어느 것이 귀하에게 적합한지 확인할 수 있습니다.

nameserver 1.1.1.1 # Cloudflare

답변3

기본 DNS 확인이 를 통해 수행되는 시스템의 경우처럼 resolv.conf문제 는 null(방금 경험한 것처럼)로 인해 발생할 수 있습니다 .systemd-resolvednsswitch

gpg제 생각에는 해당 libc 함수를 사용하지 않고 어떤 이유에서인지 그 자체를 nsswitch읽는 경우인 것 같습니다 .resolv.conf

징후:

  • gpg: keyserver receive failed: Server indicated a failure

  • /etc/resolv.conf비어 있지만 호스트 이름 확인 등은 괜찮 getent hosts google.com습니다 ping google.com. dig, drillnslookup모두 직접 읽혀지므로 작동 resolv.conf하지 않을 수 있습니다.

  • /etc/nsswitch.confsystemd에서 제공하는 모듈 hosts: files mymachines myhostname resolve [!UNAVAIL=return] dns과 비슷한 것이 있습니다 ( 자세한 내용 참조).resolveman 8 libnss_resolve.so.2

해결하다:

resolv.conf현재 파서 설정을 반영하는 시스템 자동 생성 심볼릭 링크에 대한 심볼릭 링크를 생성하려고 합니다 . man 8 systemd-resolved정확히 어떤 작업을 수행하는지 자세히 알아보려면 "/ETC/RESOLV.CONF" 섹션을 읽어 보시기 바랍니다 . 다음은 심볼릭 링크 생성에 권장되는 명령과 출력입니다.

$ # you should check this has reasonable contents before using it
$ cat /run/systemd/resolve/stub-resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad

$ rm /etc/resolv.conf
$ ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

답변4

dirmngr 2.2.4를 실행하는 우분투 18.04에서 동일한 문제가 발생했습니다. 내 DNS 설정을 확인하기로 선택하고 로컬 DNS 서버 "네임서버 1.1.1.1"과 Google의 "네임서버 8.8.8.8"을 추가했습니다. 그런 다음 작동했습니다.

관련 정보