Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 无法更新WSL分发上的包_Linux_Docker_Ubuntu_Windows Subsystem For Linux - Fatal编程技术网

Linux 无法更新WSL分发上的包

Linux 无法更新WSL分发上的包,linux,docker,ubuntu,windows-subsystem-for-linux,Linux,Docker,Ubuntu,Windows Subsystem For Linux,我正在使用Docker desktop v2.3.0,并在Windows10Professional v1909上启用了WSL2 我安装了Ubuntu 20.04发行版,我访问了它,当我运行apt-get-update: Err:1 http://archive.ubuntu.com/ubuntu focal InRelease Temporary failure resolving 'archive.ubuntu.com' Err:2 http://security.ubuntu.com/

我正在使用Docker desktop v2.3.0,并在Windows10Professional v1909上启用了WSL2

我安装了Ubuntu 20.04发行版,我访问了它,当我运行
apt-get-update

Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
我试图通过在使用
ipconfig/all
之后添加公司dns服务器来更新
/etc/resolve.conf

然后我重新启动了WSL,但不工作

我发现了一个类似的问题并尝试了这个方法,但没有一个能为我解决这个问题


我使用代理访问internet,它是否可以禁止WSL访问外部网络,并应将其添加到WSL配置文件中?

我希望标记问题的人员或关闭问题的维护人员添加有关关闭原因的注释。社区和世界各地的许多人都面临着与WSL相同的问题,对此问题没有明确而详细的答案。