1 votos

gpg: [no sé]: paquete no válido (ctb = 2d)

Tratando de arreglar un problema con mis llaves en Ubuntu Trusty :

$ apt-key list >/dev/null
gpg: [don't know]: invalid packet (ctb=2d)
gpg: keydb_search_next failed: invalid packet

Así que tengo copia de seguridad de mis llaves de repositorios PPA en /etc/apt/trusted.gpg.d.BACKUP/ :

$ sudo mv /etc/apt/trusted.gpg.d /etc/apt/trusted.gpg.d.BACKUP
$ apt-key list | grep gpg$
/etc/apt/trusted.gpg

Y luego me importan las claves GPG :

$ sudo mkdir /etc/apt/trusted.gpg.d/
$ for file in $(\ls /etc/apt/trusted.gpg.d.BACKUP/ | grep gpg$) 
> do
>   sudo gpg --no-default-keyring --keyring /etc/apt/trusted.gpg.d/$file --import /etc/apt/trusted.gpg.d.BACKUP/$file
> done
gpg: keyring `/etc/apt/trusted.gpg.d/andykimpe-gparted.gpg' created
gpg: key 274A7DA0: public key "Launchpad PPA for andykimpe" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
...
gpg: keyring `/etc/apt/trusted.gpg.d/openlp-core-release.gpg' created
gpg: key DF629112: public key "Launchpad Development Packages" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
$

Y cuando puedo comprobar, todavía tengo el mismo :

$ apt-key list | grep gpg$
/etc/apt/trusted.gpg

Es como si nada hubiera importado.

Puede usted ayudar ?

1voto

pavid Puntos 849

Fue un tema de permiso:

 $ ll -d /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d /etc/apt/trusted.gpg.d/*.gpg | head
-rw-r--r-- 1 root root 12335 2019-02-24 11:31:28 /etc/apt/trusted.gpg
drwxr-xr-x 2 root root  4096 2019-02-24 12:00:11 /etc/apt/trusted.gpg.d/
-rw------- 1 root root  1132 2019-02-24 12:00:09 /etc/apt/trusted.gpg.d/andykimpe-gparted.gpg
-rw------- 1 root root   362 2019-02-24 12:00:09 /etc/apt/trusted.gpg.d/brightbox-ruby-ng.gpg
-rw------- 1 root root   353 2019-02-24 12:00:09 /etc/apt/trusted.gpg.d/cairo-dock-team-ppa.gpg
-rw------- 1 root root   364 2019-02-24 12:00:09 /etc/apt/trusted.gpg.d/centrych-updates.gpg
-rw------- 1 root root  9178 2019-02-24 12:00:10 /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg
-rw------- 1 root root  3780 2019-02-24 12:00:10 /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg
-rw------- 1 root root  2851 2019-02-24 12:00:10 /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg
-rw------- 1 root root   357 2019-02-24 12:00:10 /etc/apt/trusted.gpg.d/djcj-hybrid.gpg
$ sudo chmod -v a+r /etc/apt/trusted.gpg.d/*.gpg
mode of ‘/etc/apt/trusted.gpg.d/andykimpe-gparted.gpg' changed from 0600 (rw-------) to 0644 (rw-r--r--)
mode of ‘/etc/apt/trusted.gpg.d/brightbox-ruby-ng.gpg' changed from 0600 (rw-------) to 0644 (rw-r--r--)
mode of ‘/etc/apt/trusted.gpg.d/cairo-dock-team-ppa.gpg' changed from 0600 (rw-------) to 0644 (rw-r--r--)
mode of ‘/etc/apt/trusted.gpg.d/centrych-updates.gpg' changed from 0600 (rw-------) to 0644 (rw-r--r--)
mode of ‘/etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg' changed from 0600 (rw-------) to 0644 (rw-r--r--)
mode of ‘/etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg' changed from 0600 (rw-------) to 0644 (rw-r--r--)
mode of ‘/etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg' changed from 0600 (rw-------) to 0644 (rw-r--r--)
mode of ‘/etc/apt/trusted.gpg.d/djcj-hybrid.gpg' changed from 0600 (rw-------) to 0644 (rw-r--r--)
...
$ apt-key list | grep gpg$
/etc/apt/trusted.gpg
/etc/apt/trusted.gpg.d/andykimpe-gparted.gpg
/etc/apt/trusted.gpg.d/brightbox-ruby-ng.gpg
/etc/apt/trusted.gpg.d/cairo-dock-team-ppa.gpg
/etc/apt/trusted.gpg.d/centrych-updates.gpg
/etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg
/etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg
/etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg
/etc/apt/trusted.gpg.d/djcj-hybrid.gpg
...
$ sudo apt update
...
Fetched 143 kB in 26s (5 487 B/s)
W: GPG error: http://liveusb.info all Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4E940D7FDD7FB8CC
W: GPG error: http://kovacsoltvideo.hu ./ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ADC80AAEABE7778C
W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3BDAAC08614C4B38
W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 69AD89E0EC179BCC
W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A7E13D78E4A4F4F4
W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FE7385FFAC9B079A
W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6D975C4791E7EE5E
W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4C1CBE14852541CB
W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EBB4CCF6A72BC110
W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 03647209B58A653A
W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 03647209B58A653A
W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY BE362D6D32DE30FB
W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY BC3E0682A5A1D6B2
W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 60ED5CE429FFDC52
W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 55E2097C08E6D617
W: Failed to fetch http://build.openvpn.net/debian/openvpn/stable/dists/trusty/main/binary-i386/Packages  403  Forbidden [IP: 146.112.61.106 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.
 

Luego pasé las claves que faltaban con el comando sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key y ahora finalmente se resolvió.

EnMiMaquinaFunciona.com

EnMiMaquinaFunciona es una comunidad de administradores de sistemas en la que puedes resolver tus problemas y dudas.
Puedes consultar las preguntas de otros sysadmin, hacer tus propias preguntas o resolver las de los demás.

Powered by: