在终端 ubuntu 18.04 上更新软件包时出现错误。执行此命令时
sudo apt-get update
然后在更新时,出现如下错误
Ign:1 cdrom://Ubuntu-MATE 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426) bionic InRelease
Hit:2 cdrom://Ubuntu-MATE 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426) bionic Release
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Err:5 http://archive.ubuntu.com/ubuntu bionic InRelease
The following signatures were invalid: BADSIG 3B4FE6ACC0B21F32 Ubuntu Archive Automatic Signing Key (2012) <[email protected]>
Get:6 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [115 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:8 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [45.5 kB]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [36.9 kB]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [21.5 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [189 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [1176 B]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [75.9 kB]
Get:14 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [632 B]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [119 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [51.7 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [3544 B]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Translation-en [2060 B]
Fetched 1075 kB in 9s (115 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu bionic InRelease: The following signatures were invalid: BADSIG 3B4FE6ACC0B21F32 Ubuntu Archive Automatic Signing Key (2012) <[email protected]>
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease The following signatures were invalid: BADSIG 3B4FE6ACC0B21F32 Ubuntu Archive Automatic Signing Key (2012) <[email protected]>
W: Some index files failed to download. They have been ignored, or old ones used instead.
错误信息是
The following signatures were invalid: BADSIG 3B4FE6ACC0B21F32 Ubuntu Archive Automatic Signing Key (2012) <[email protected]>
W: Some index files failed to download. They have been ignored, or old ones used instead.
有人可以解决这个问题吗?
我尝试使用 ubuntu 18.04 和 ubuntu mate 18.04。两者都出现了同样的错误。
先行致谢。
怎么修
在谷歌上搜索了很长时间后,我找到了另一种方法,即替换http://archive.ubuntu.com使用来自的替代存储库https://launchpad.net/ubuntu/+archivemirrors或者我们可以使用 digitalocean 镜像仓库http://mirrors.digitalocean.com
答案1
在谷歌上搜索了很长时间后,我找到了另一种方法来解决这个问题,即用来自的备用仓库替换 archive.ubuntu.com 仓库https://launchpad.net/ubuntu/+archivemirrors