当我尝试更新 Ubuntu 17.04 时,出现此错误。我已经尝试了几种解决方案,但到目前为止都没有效果。我收到以下错误:
Reading package lists... Done
W: GPG error: http://archive.canonical.com/ubuntu precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: The repository 'http://archive.canonical.com/ubuntu precise Release' 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://extras.ubuntu.com/ubuntu precise Release: The following signatures were invalid: C47415DFF48C09645B78609416126D3A3E5C1192
W: The repository 'http://extras.ubuntu.com/ubuntu precise Release' 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://us.archive.ubuntu.com/ubuntu precise-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: The repository 'http://us.archive.ubuntu.com/ubuntu precise-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://us.archive.ubuntu.com/ubuntu precise-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: The repository 'http://us.archive.ubuntu.com/ubuntu precise-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://us.archive.ubuntu.com/ubuntu precise-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: The repository 'http://us.archive.ubuntu.com/ubuntu precise-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.
答案1
运行此命令来保存你的 sourses.list。
sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
然后转到此页面Ubuntu 源列表生成器
然后选择你的国家和你的 ubuntu 版本,然后生成列表,然后运行此命令后复制并粘贴sudo nano /etc/apt/sources.list
最后一个命令sudo apt-get update
玩得开心 !