wsl中起容器使用ubuntu, apt update失败

Asked by 宫汝林

请问一下, 我用wsl安装的docker, 通过docker pull命令从仓库拉取了镜像ubuntu:18.04到本地, 然后用此镜像起了一个ubuntu容器, 在容器中我运行apt-get update命里, 提示失败, 修改source.list为国内源之后仍然失败, 运行信息如下. 但是我用vmware起虚拟机, 在虚拟机的docker中起ubuntu容器运行命令就没有问题, wsl和vmware中安装的也都是ubuntu, 不知是不是wsl的问题还是ubuntu的问题, 为什么会这样呢?

root@cdddfd79c76b:/# apt update
Get:1 http://mirrors.aliyun.com/ubuntu bionic InRelease [242 kB]
Get:2 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease [74.6 kB]
Err:1 http://mirrors.aliyun.com/ubuntu bionic InRelease
  At least one invalid signature was encountered.
Err:2 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease
  At least one invalid signature was encountered.
Err:3 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease
  At least one invalid signature was encountered.
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Err:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
  At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: http://mirrors.aliyun.com/ubuntu bionic InRelease: At least one invalid signature was encountered.
E: The repository 'http://mirrors.aliyun.com/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://mirrors.aliyun.com/ubuntu bionic-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://mirrors.aliyun.com/ubuntu bionic-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://mirrors.aliyun.com/ubuntu bionic-backports InRelease: At least one invalid signature was encountered.
E: The repository 'http://mirrors.aliyun.com/ubuntu bionic-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://security.ubuntu.com/ubuntu bionic-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://security.ubuntu.com/ubuntu bionic-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Question information

Language:
Chinese (Simplified) Edit question
Status:
Expired
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.