Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apt update is failing in 2004 with WSL 2 #5765

Closed
jenishngl opened this issue Aug 15, 2020 · 4 comments
Closed

apt update is failing in 2004 with WSL 2 #5765

jenishngl opened this issue Aug 15, 2020 · 4 comments

Comments

@jenishngl
Copy link

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.450]
Your Distribution version: [Ubuntu 20.04
Whether the issue is on WSL 2 and/or WSL 1:  Linux version 4.19.104-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Wed Feb 19 06:37:35 UTC 2020 || WSL 2

Steps to reproduce

  1. I upgraded my PC from Windows 10 Enterprise 1909 to Windows 10 Enterprise 2004 using the Windows 10 Upgrade Assistant.
  2. Then followed the steps to upgrade WSL 1 to WSL 2.
  3. Then ran "wsl --set-version Ubuntu-20.04 2" to convert to WSL 2
  4. After the above, now if I run sudo apt update, I am getting the below errors.
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
Building dependency tree
Reading state information... Done
All packages are up to date.
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.

Expected behavior

"sudo apt update" should connect to the servers and fetch the updated list

Actual behavior

"sudo apt update" is failing

@therealkenc
Copy link
Collaborator

/dupe #5256 #3438 etc

@ghost
Copy link

ghost commented Aug 15, 2020

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

@ghost ghost closed this as completed Aug 15, 2020
@ghost ghost added the duplicate label Aug 15, 2020
@masterEddie
Copy link

vim /etc/resolv.conf
添加
nameserver 8.8.8.8
nameserver 8.8.4.4

@decuser
Copy link

decuser commented Dec 22, 2022

@masterEddie's tip to edit resolv.conf is a great workaround.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants