I am running an ubuntu (focal 20.04
) on WSL2
and i am trying to install gcc and it seems i need to run apt-get update
first.
I keep getting Could not resolve us.us.archive.ubuntu.com
(error below).
I have checked for solutions and edited the /etc/resolv.conf
adding the additional nameservers like below:
/etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the foll># [network]# generateResolvConf = falsenameserver 172.17.96.1nameserver 8.8.8.8nameserver 8.8.4.4
Error
sanzor@DESKTOP-GOMS8S8:~/rust$ sudo apt-get update[sudo] password for sanzor: Get:1 http://archive.ubuntu.com/ubuntu focal-proposed InRelease [267 kB]Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB] Ign:3 http://binaries.erlang-solutions.com/debian focal InRelease Hit:4 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial InRelease Hit:5 http://binaries.erlang-solutions.com/debian focal Release Err:6 http://us.us.archive.ubuntu.com/ubuntu focal InRelease Could not resolve 'us.us.archive.ubuntu.com'Err:7 http://us.us.archive.ubuntu.com/ubuntu focal-updates InRelease Could not resolve 'us.us.archive.ubuntu.com'Ign:9 http://archive.ubuntu.com/ubuntu trusty InRelease Err:10 http://us.us.archive.ubuntu.com/ubuntu focal-backports InRelease Could not resolve 'us.us.archive.ubuntu.com'Hit:11 http://archive.ubuntu.com/ubuntu trusty-security InRelease Hit:12 http://archive.ubuntu.com/ubuntu trusty-updates InRelease Hit:13 http://archive.ubuntu.com/ubuntu trusty-proposed InRelease Hit:14 http://archive.ubuntu.com/ubuntu trusty-backports InRelease Hit:15 https://packages.microsoft.com/ubuntu/20.04/prod focal InReleaseHit:16 http://archive.ubuntu.com/ubuntu trusty ReleaseFetched 381 kB in 1s (379 kB/s)Reading package lists... DoneW: Failed to fetch http://us.us.archive.ubuntu.com/ubuntu/dists/focal/InRelease Could not resolve 'us.us.archive.ubuntu.com'W: Failed to fetch http://us.us.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Could not resolve 'us.us.archive.ubuntu.com'W: Failed to fetch http://us.us.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Could not resolve 'us.us.archive.ubuntu.com'W: Some index files failed to download. They have been ignored, or old ones used instead.
P.SI do not know why it goes for us.us.archive.ubuntu.com
, or in which file to look for that setting to change , if i can.