0

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..

5
  • Try opening those URLs in a web browser.
    – user535733
    Mar 2, 2022 at 21:15
  • @user535733 that works I get the content from the URLS.
    – Chang Zhao
    Mar 3, 2022 at 18:51
  • Are you perhaps using an Apt proxy?
    – user535733
    Mar 3, 2022 at 19:16
  • Sorry, I don't know if such a thing exists !
    – Chang Zhao
    Mar 3, 2022 at 19:59
  • ok, so I tried this : askubuntu.com/questions/344802/… and added Acquire HTTP Proxy: False as shown here: askubuntu.com/a/345211/870910 but I still have no success, do I have to reboot or what I also checked /etc/environment
    – Chang Zhao
    Mar 3, 2022 at 20:19

0

Browse other questions tagged .