Linux 无法更新WSL分发上的包
我正在使用Docker desktop v2.3.0,并在Windows10Professional v1909上启用了WSL2 我安装了Ubuntu 20.04发行版,我访问了它,当我运行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/
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相同的问题,对此问题没有明确而详细的答案。