Errore di apt-get update NO PUBKEY

From RVM Wiki
Jump to navigation Jump to search

Se a seguito di un update di apt-get si ottiene un errore simile a:

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 010908312D230C5F

Oppure

NO_PUBKEY 9AA38DCD55BE302B

Significa che la chiave apt-key 010908312D230C5F non è presente nel database.

Per importarla è possibile fare in due modi:

Installazione dai pacchetti Debian

Se è una chiave Debian riconosciuta, installare le chiavi contenute nel pacchetto debian-archive-keyring:

sudo apt-get install debian-archive-keyring

Aggiornare le fonti

sudo apt-get update


Importazione da un KeyServer

Se la chiave non è contenuta in questo archivio, verificare che chiave sia, e installarla da un Keyserver:

$ gpg --keyserver pgpkeys.mit.edu --recv-key 010908312D230C5F
gpg: requesting key 2D230C5F from hkp server pgpkeys.mit.edu
gpg: chiave 2D230C5F: chiave pubblica «Debian Archive Automatic Signing Key (2006) <ftpmaster@debian.org>» importata
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Numero totale esaminato: 1
gpg:               importate: 1

$ gpg -a --export 010908312D230C5F  > keyfile

$sudo apt-key add keyfile
OK

$rm -f keyfile

Naturalmente il numero della chiave varia in base al repository

Riferimenti