Um comando bastante padrão falha: apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
Estou usando o docker e determinei que ele falha apenas no ambiente do Docker.
$ docker run --rm -it --entrypoint bash resin/jetson-tx2-debian:stretch
root@8ddf33f82fee:/# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
Executing: /tmp/apt-key-gpghome.aflZmH62Gv/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
gpg: keyserver receive failed: Connection refused
Isso parece ser um problema com o modo como o dirmngr usa servidores DNS. link Fazer uma alteração no resolv.conf parece ajudar:
# Changed to only include "nameserver 8.8.8.8"
root@8ddf33f82fee:/# nano /etc/resolv.conf
E finalmente sucesso:
root@8ddf33f82fee:/# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
Executing: /tmp/apt-key-gpghome.LQgK0o5ZBJ/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
gpg: key 40976EAF437D05B5: public key "Ubuntu Archive Automatic Signing Key <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1
Verificando versões:
root@afff63f7c3b7:/# dirmngr --version
dirmngr (GnuPG) 2.1.18
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
root@afff63f7c3b7:/# gpg --version
gpg: WARNING: unsafe permissions on homedir '/root/.gnupg'
gpg (GnuPG) 2.1.18
libgcrypt 1.7.6-beta
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /root/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
Minha pergunta é: qual é a solução apropriada aqui? Meus pacotes parecem estar atualizados, mas esses erros persistem.