Score:0

why apt update says Temporary failure resolving when I can ping those domain names?

nl flag

When I try to do apt update I get this error:

# apt-get update
Err:1 http://ppa.launchpad.net/ansible/ansible/ubuntu focal InRelease
  Temporary failure resolving 'ppa.launchpad.net'
Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:3 http://us.archive.ubuntu.com/ubuntu focal InRelease
  Temporary failure resolving 'us.archive.ubuntu.com'
Err:4 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
  Temporary failure resolving 'us.archive.ubuntu.com'
Err:5 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
  Temporary failure resolving 'us.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Temporary failure resolving 'us.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 http://ppa.launchpad.net/ansible/ansible/ubuntu/dists/focal/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.

But when I try to ping security.ubuntu.com, ppa.launchpad.net or us.archive.ubuntu.com I do not get the temporary failure resolving them.

# ping ppa.launchpad.net
PING ppa.launchpad.net (91.189.95.85) 56(84) bytes of data.
64 bytes from ganondorf.canonical.com (91.189.95.85): icmp_seq=1 ttl=52 time=9.94 ms
64 bytes from ganondorf.canonical.com (91.189.95.85): icmp_seq=2 ttl=52 time=9.77 ms
^C
--- ppa.launchpad.net ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1003ms
rtt min/avg/max/mdev = 9.767/9.852/9.938/0.085 ms

or

# ping security.ubuntu.com
PING security.ubuntu.com (91.189.91.39) 56(84) bytes of data.
64 bytes from kazooie.canonical.com (91.189.91.39): icmp_seq=1 ttl=48 time=84.8 ms
64 bytes from kazooie.canonical.com (91.189.91.39): icmp_seq=2 ttl=48 time=84.3 ms
^C
--- security.ubuntu.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 84.279/84.516/84.754/0.237 ms

and even:

# ping us.archive.ubuntu.com
PING us.archive.ubuntu.com (91.189.91.39) 56(84) bytes of data.
64 bytes from kazooie.canonical.com (91.189.91.39): icmp_seq=1 ttl=48 time=84.5 ms
64 bytes from kazooie.canonical.com (91.189.91.39): icmp_seq=2 ttl=48 time=84.6 ms
^C^C
--- us.archive.ubuntu.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 84.525/84.550/84.576/0.025 ms

I have tried apt-get update --fix-missing but still getting same issue.

my distro is

# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.4 LTS"

please help..

user535733 avatar
cn flag
Try opening those URLs in a web browser.
Chang Zhao avatar
nl flag
@user535733 that works I get the content from the URLS.
user535733 avatar
cn flag
Are you perhaps using an Apt proxy?
Chang Zhao avatar
nl flag
Sorry, I don't know if such a thing exists !
Chang Zhao avatar
nl flag
ok, so I tried this : https://askubuntu.com/questions/344802/why-is-apt-get-always-using-proxy-although-no-proxy-is-configured and added `Acquire HTTP Proxy: False` as shown here: https://askubuntu.com/a/345211/870910 but I still have no success, do I have to reboot or what I also checked /etc/environment
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.