从 14.04 更新至 16.04 失败,出现 GPG 错误

从 14.04 更新至 16.04 失败,出现 GPG 错误

升级后 apt-get update - 我收到以下消息

W: GPG error: http://archive.canonical.com/ubuntu xenial InRelease: At least one invalid signature was encountered.
W: The repository 'http://archive.canonical.com/ubuntu xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial InRelease: At least one invalid signature was encountered.
W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial-security InRelease: At least one invalid signature was encountered.
W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial-security InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial-updates InRelease: At least one invalid signature was encountered.
W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial-updates InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial-proposed InRelease: At least one invalid signature was encountered.
W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial-proposed InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ua.archive.ubuntu.com/ubuntu xenial-backports InRelease: At least one invalid signature was encountered.
W: The repository 'http://ua.archive.ubuntu.com/ubuntu xenial-backports InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

尝试过

sudo apt-get clean
sudo mv /var/lib/apt/lists /tmp
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update

这没有帮助。

我当前的 source.list:

###### Ubuntu Main Repos
deb http://ua.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://ua.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse 
deb http://ua.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse 
deb http://ua.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse 
deb http://ua.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu xenial partner

答案1

修复了它rm -rf /etc/apt/trusted.gpg.d/*

显然,尽管这些存储库已被禁用,但一些旧存储库的 gpg 还是把事情搞乱了。

相关内容