Ошибка при apt-get update

При обновление debian 8 jessie возникла ошибка ключа:

Reading package lists...
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://apt.postgresql.org xenial-pgdg InRelease: The following signatures were invalid: KEYEXPIRED 1562078959

W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/xenial-pgdg/InRelease

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

или может быть вот такая ещё:

W: There is no public key available for the following key IDs:

Посмотреть всё истёкшие ключи можно так:

apt-key list | grep -A 1 expired

Вот пример ответа:

pub 4096R/ACCC4CF8 2011-10-13 [expired: 2019-07-02]
uid PostgreSQL Debian Repository

Далее надо выполнить команду, которая обновит ключ. В самой команде в конце надо указать сам истёкший ключ:

apt-key adv --recv-keys --keyserver keys.gnupg.net ACCC4CF8

При успешном выполнении команды должен быть ответ вида:

gpg: requesting key ACCC4CF8 from hkp server keys.gnupg.net
gpg: key ACCC4CF8: public key "Totally Legit Signing Key <mallory@example.org>" imported
gpg: key ACCC4CF8: "PostgreSQL Debian Repository" 4 new signatures
gpg: Total number processed: 2
gpg: imported: 1 (RSA: 1)
gpg: new signatures: 4

После чего команда apt-get update должна выполниться успешно.

Добавить комментарий