WSL 2 Ubuntu 22.04 无网络连接问题求助
WSL 2 Ubuntu 22.04 无网络连接问题求助
大家好,我最近在Windows 10机器上安装了WSL 2 Ubuntu 22.04,但网络完全没法正常工作——我根本没有网络访问权限。
我试了几个命令,比如sudo apt update直接提示连接失败,ping google.com也连不通。
先贴一下我的Windows系统信息:
- 版本:Windows 10 Enterprise
- 系统版本:21H2
- 安装日期:06/02/2023
- OS build:19044.2486
- Windows Feature Experience Pack:120.2212.4190.0
下面是执行sudo apt update的完整输出:
~$ sudo apt update Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease Ign:1 http://archive.ubuntu.com/ubuntu jammy InRelease Ign:2 http://security.ubuntu.com/ubuntu jammy-security InRelease Ign:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease Ign:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease Err:1 http://archive.ubuntu.com/ubuntu jammy InRelease Temporary failure resolving 'archive.ubuntu.com' Err:2 http://security.ubuntu.com/ubuntu jammy-security InRelease Temporary failure resolving 'security.ubuntu.com' Err:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease Temporary failure resolving 'archive.ubuntu.com' Err:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease Temporary failure resolving 'archive.ubuntu.com' Reading package lists... Done Building dependency tree... Done Reading state information... Done All packages are up to date. W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease Temporary failure resolving 'security.ubuntu.com' W: Some index files failed to download. They have been ignored, or old ones used instead.
备注:内容来源于stack exchange,提问作者hobbsie




