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... DoneW: 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.
Above is the error I receive every time I attempt to update Ubuntu. I have Ubuntu from the microsoft store, it's the one with no version listed in the title.Since I can't update, I am also unable to get gcc, make, etc as well. I receive the same error each time.
Any tips or advice is appreciated. Thanks in advance.
UPDATE (May 4 2021):The solution is to type
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
into the terminal. It adds a nameserver (specifically Google's server) so everything can connect and update. Immediately after doing this I was able to successfully update the files and download gcc, make, and other files using sudo apt -get.