This is the output I get when I try to run sudo apt-get update or when I try to install anything.
sudo apt-get update
Err:1 http://dl.google.com/linux/chrome/deb stable InRelease
Could not resolve ‘dl.google.com’
Err:2 http://gb.archive.ubuntu.com/ubuntu bionic InRelease
Could not resolve ‘gb.archive.ubuntu.com’
Err:3 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease
Could not resolve ‘gb.archive.ubuntu.com’
Err:4 http://gb.archive.ubuntu.com/ubuntu bionic-backports InRelease
Could not resolve ‘gb.archive.ubuntu.com’
Err:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Could not resolve ‘security.ubuntu.com’
Reading package lists... Done
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/bionic/InRelease Could not resolve ‘gb.archive.ubuntu.com’
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Could not resolve ‘gb.archive.ubuntu.com’
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Could not resolve ‘gb.archive.ubuntu.com’
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Could not resolve ‘security.ubuntu.com’
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease Could not resolve ‘dl.google.com’
W: Some index files failed to download. They have been ignored, or old ones used instead.
I also cannot access github telling me that github could not be resolved.
Any clue what might cause this?
UPDATE: output from traceroute
traceroute dl.google.com
traceroute to dl.google.com (216.58.210.46), 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 * peer7-et-0-0-1.telehouse.ukcore.bt.net (62.172.103.158) 20.930 ms peer8-et-0-1-4.telehouse.ukcore.bt.net (109.159.252.106) 20.638 ms
7 109.159.253.235 (109.159.253.235) 22.406 ms 195.99.126.75 (195.99.126.75) 25.586 ms 109.159.253.93 (109.159.253.93) 24.234 ms
8 * * *
9 72.14.236.224 (72.14.236.224) 27.654 ms 108.170.234.160 (108.170.234.160) 27.338 ms 74.125.252.128 (74.125.252.128) 28.687 ms
10 * * *
11 * * lhr25s11-in-f14.1e100.net (216.58.210.46) 20.101 ms
It sounds like a DNS issue. To fix it, you need to ensure that
/etc/resolv.conf has good entries for DNS servers.
Google has public DNS servers that you can use.
So for example, you could add the following 2 lines to the top of your /etc/resolv.conf file (these point at the Google DNS servers) as detailed above:
nameserver 8.8.8.8 nameserver 8.8.4.4
In addition, if you use a proxy, be sure that you have created/modified the file /etc/apt/apt.conf to specify your proxy as below:
Acquire::http::Proxy "http://Your_Proxy:Port";
Acquire::https::Proxy "http://Your_Proxy:Port";
Acquire::ftp::Proxy "http://Your_Proxy:Port";