Score:0

Ubuntu 20.04 Focal Fossa apt get update error

gf flag

I am using Ubuntu 20.04 Focal Fossa, and from last couple of month I am noticing the apt update is not fetching any results. It used to work before that.

kaziray@kaziray-Lenovo-ideapad-330-15IKB:/etc/apt$ sudo apt update
[sudo] password for kaziray: 
Err:1 http://archive.canonical.com/ubuntu focal InRelease
  Could not resolve 'server'
Err:2 http://in.archive.ubuntu.com/ubuntu focal InRelease
  Could not resolve 'server'
Err:3 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
  Could not resolve 'server'
Err:4 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
  Could not resolve 'server'
Err:5 http://in.archive.ubuntu.com/ubuntu focal-security InRelease
  Could not resolve 'server'
Reading package lists... Done
Building dependency tree       
Reading state information... Done
169 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal/InRelease  Could not resolve 'server'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Could not resolve 'server'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Could not resolve 'server'
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/focal/InRelease  Could not resolve 'server'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-security/InRelease  Could not resolve 'server'

This is my /etc/resolv.conf content:

nameserver 127.0.0.53
nameserver 8.8.8.8
options edns0 trust-ad

I have added the nameserver 8.8.8.8 recently, when I had found out that my sudo ping was not working, however ping was working.

I have tried with main server, India, Singapore mirrors, but all of them is giving the same error. I checked if my ISP has any firewall, I don't think so.

Ping works to archive.ubuntu.com or its mirrors as expected:

kaziray@kaziray-Lenovo-ideapad-330-15IKB:/etc/apt$ sudo ping in.archive.ubuntu.com
PING in.archive.ubuntu.com (91.189.91.83) 56(84) bytes of data.
64 bytes from ubuntu-mirror-3.ps6.canonical.com (91.189.91.83): icmp_seq=1 ttl=55 time=286 ms
64 bytes from ubuntu-mirror-3.ps6.canonical.com (91.189.91.83): icmp_seq=2 ttl=55 time=285 ms
64 bytes from ubuntu-mirror-3.ps6.canonical.com (91.189.91.83): icmp_seq=3 ttl=55 time=286 ms
64 bytes from ubuntu-mirror-3.ps6.canonical.com (91.189.91.83): icmp_seq=4 ttl=55 time=286 ms
64 bytes from ubuntu-mirror-3.ps6.canonical.com (91.189.91.83): icmp_seq=5 ttl=55 time=288 ms
64 bytes from ubuntu-mirror-3.ps6.canonical.com (91.189.91.83): icmp_seq=6 ttl=55 time=285 ms
^C
--- in.archive.ubuntu.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5003ms

The main, universe, multiverse and restricted servers are selected. In Other Software, Canonical Partners is selected. No Additional Driver is selected.

Network Proxy is disabled.

Don't know what's the problem.

Imran K avatar
gf flag
Hello All, can I get some help here? Essentially it looks like, the apt doesn't find that I have an internet connection, why is that so?
Imran K avatar
gf flag
Looks like the same issue as this:https://askubuntu.com/questions/965998/apt-get-update-isnt-able-to-connect-to-the-internet
I sit in a Tesla and translated this thread with Ai:

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.