Windows 10 WSL2 – Ubuntu – apt update with Temporary failure resolving

  apt, ubuntu-20.04, windows, wsl-2

I’m running windows 10 with WSL2.
I installed a distribution of Ubuntu 20.04.

When I do sudo apt update, it’s working

Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Fetched 328 kB in 17s (19.3 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

Then I tried adding a repository for podman. In /etc/apt/sources.list

deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /

But now when doing sudo apt update I got

Err:1 https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04  InRelease
  Temporary failure resolving 'download.opensuse.org'
Err:2 http://archive.ubuntu.com/ubuntu focal InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://security.ubuntu.com/ubuntu focal-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Fetched 214 kB in 34s (6269 B/s)
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://security.ubuntu.com/ubuntu/dists/focal-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/InRelease  Temporary failure resolving 'download.opensuse.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.

Removing the repository line and it is working.

What would be the problem ?

Source: Windows Questions

LEAVE A COMMENT