-1

I just installed ubuntu 20.0 LTS as a dual boot to windows 11. My WIFI works fine when surfing the internet through firefox. when i try to update running:

sudo apt update

I get the following error:

Screen shot from terminal

I also have a question mark on the top right WIFI icon.


This seems to be related to my WIFI because when I try the same when connected to phone Hotspot it works fine. However, This would be very costly as it is a metered connection. Also changing the update mirror doesn't seem to work.
stumblebee
  • 3,547
  • Screen shots aren't great. Typically you can highlight text in terminals then right click to get option menu then copy. Also Ctrl-Shift-C often works in terminals. – Michael Mantion Dec 31 '21 at 22:30
  • Try https://askubuntu.com/questions/1198621/apt-get-cannot-connect-to-ubuntu-archives – Michael Mantion Dec 31 '21 at 22:35
  • i tried copying an pasting says i have to have 8 reputations to post links since there are links in the error. – superok4luv2u Dec 31 '21 at 22:38
  • Tried the first solution on the question you posted and it still doesn't work. – superok4luv2u Dec 31 '21 at 22:40
  • ping mirror.amsihosting.net did not return a result for me. Its possible the DNS your phone uses has the site registered. Regardless you need to find an alternative to mirror.amsihosting.net

    https://askubuntu.com/q/37753/744266 2nd option looks simple enough

    – Michael Mantion Dec 31 '21 at 23:07
  • I actually get a similar error when using the Main server instead. This mirror is the one i got when i clicked find best mirror on the UI, but that is using my phone network, trying this with my regular WIFI network gives me no mirror found. – superok4luv2u Dec 31 '21 at 23:38
  • I wonder if you have some sort of ip conflict. Do you have other wifi devices on that 4g router? I guess its possible the 4g isp is some how blocking updates, do you have a VPN? Just seems odd that firefox has full access to the internet but non apt can't access any of the mirrors. Hopefully you figure it out. – Michael Mantion Dec 31 '21 at 23:49
  • No its not about the IP conflict my disconnecting everything except my laptop doesn't solve the issue, and i don't have a VPN. The only thing i found while searching is that when going to settings>privacy and turning off check connectivity removes the "?" from my WIFI icon. but doesn't help with anything else. – superok4luv2u Dec 31 '21 at 23:55
  • I think you are asking the wrong question. You should be asking how to troubleshoot your problematic network connection. While it might work on Firefox, your system is clearly trying to tell you about a networking problem. – user535733 Jan 01 '22 at 00:25
  • It might be, but my network works fine on windows and Firefox on Ubuntu and i just installed Ubuntu for the Odin project and i had no problem before. Even pinging archive.canonical.com doesn't give an error. – superok4luv2u Jan 01 '22 at 00:38
  • The mirror you have selected is down - use the links above to select a mirror that is working – teambob Jun 08 '22 at 06:31

2 Answers2

0

This error can happen when fetching the latest repositories during "apt-get update" was interrupted, and a subsequent "apt-get update" is not able to resume the interrupted fetch. In this case, remove the content in /var/lib/apt/lists before retrying "apt-get update".try this:

$ sudo rm -rf /var/lib/apt/lists/* $ sudo apt-get update

More you can find here

-2

It turns out that for some reason my ISP doesn't like the Ubuntu repos, even the country specific ones. I figured that i could get a mirror from launchpad.net and update /etc/apt/source-list with it. And voila, sudo apt update works like a charm or at least that's how it appears so.

Zanna
  • 70,465
  • 2
    Can you be more specific? What page did you get the mirror URL from and how did you add it? – Zanna Jan 02 '22 at 05:31