43

I just installed a fresh version of Ubuntu 19.10 today, and the first thing I decided to do was to install GNU Screen, using sudo apt-get install screen. my output was:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package screen

I figured the package archives were not quite updated as it was a clean install so I tried sudo apt-get update. This is what I got:

Get:1 http://security.ubuntu.com/ubuntu eoan-security InRelease [97.5 kB]      
Err:2 http://au.archive.ubuntu.com/ubuntu eoan InRelease
  Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) Could not connect to au.archive.ubuntu.com:80 (202.158.214.106), connection timed out
Err:3 http://au.archive.ubuntu.com/ubuntu eoan-updates InRelease   
  Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable)
Err:4 http://au.archive.ubuntu.com/ubuntu eoan-backports InRelease
  Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable)
Fetched 97.5 kB in 31s (3,106 B/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/eoan/InRelease  Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) Could not connect to au.archive.ubuntu.com:80 (202.158.214.106), connection timed out
W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/eoan-updates/InRelease  Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable)
W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/eoan-backports/InRelease  Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable)
W: Some index files failed to download. They have been ignored, or old ones used instead.

I'm really not sure why it would be doing this, other than maybe some first-use hiccups? The computer is definitely connected to the internet, as I am writing this from that machine, and I have tried running the commands after rebooting and it still gives the errors. I can't seem to be able to connect to au.archive.ubuntu.com at all. ping au.archive.ubuntu.com just sits there without a response. If anyone could help, that would be great! If any extra information is required I'd be happy to edit it into the question.

3
  • 1
    Welcome to AskUbuntu. Sometimes you find the servers unavailable or being down, can you check if the same happens when you use the main archive servers. Usually the problem solves itself after a while.
    – Videonauth
    Dec 26, 2019 at 8:30
  • Thanks, but how do I do that? I can't seem to find how using a quick search, and I've never had to do that in the past. I do apologise if it is obvious!
    – Architect
    Dec 26, 2019 at 9:02
  • There are two options to do that one is using the GUI 'Software & Updates' program or you edit the file /etc/apt/sources.list and change the Ubuntu links from http://au.archive.ubuntu.com/ubuntu ... to http://archive.ubuntu.com/ubuntu ....
    – Videonauth
    Dec 26, 2019 at 9:05

5 Answers 5

55

I just worked it out with help from a commenter. I had to go to the 'Software and Updates' Menu and change the 'Download from:' menu to Main Server. It does seem that there is a temporary issue with the Australian servers and nothing wrong with my system.

Software & Updates

For server installations, see How do I change mirrors in Ubuntu Server from regional to main?

1
  • 1
    This worked for me along with automatic proxy with proxy link
    – Vinayak
    Jan 17, 2022 at 19:15
24

I had the same problem,

$ sudo apt update 
  Could not connect to in.archive.ubuntu.com:80 (*2403:8940:ffff::f*), connection timed out Could not connect to in.archive.ubuntu.com:80 (103.97.84.254), connection timed out
Err:8 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
  Unable to connect to in.archive.ubuntu.com:http:
Err:9 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease
  Unable to connect to in.archive.ubuntu.com:http:

Editing /etc/apt/sources.list worked for me. To edit, run

visudo /etc/apt/sources.list

There you just need to replace all http://**xx**.archive.ubuntu.com/ubuntu... to http://archive.ubuntu.com/ubuntu ...

That's it. Retry

sudo apt update
4
  • The way it worked for me, was the other way around. Adding the regional server (us in my case) becase the main server appears to be unreachable.
    – Luigi Siri
    Jan 6, 2021 at 15:45
  • 1
    I tried without and with 'us.'. It didn't work for me. Apr 24, 2021 at 1:47
  • This is a real problem, changing servers in the dialog misses some of them, notably rrrrrr-UPDATES. We shouldl not have to do this. On a side note why is the OPTUS MIRROR no longer in the list? It is the fastest source for BigPond in most major cities, some sort of peering priority. Faster than Steam.
    – mckenzm
    May 24, 2021 at 18:13
  • To replace you can do it like that: :%s/**xx**.archive/archive/g
    – E235
    Aug 30, 2022 at 6:57
8

In ubunto Server Change Dns to 8.8.8.8

echo nameserver 8.8.8.8 | sudo tee /etc/resolv.conf

It Works

1
  • 1
    While editing Windows DNS config, I somehow created weird connectivity issues that affected Ubuntu [WSL2]. I did opt to replace 8.8.8.8 with 1.1.1.1, but that was my only modification before trying this suggestion, and it worked like a charm. Thanks!
    – killshot13
    Jan 26, 2023 at 11:29
-1

Sometimes we are in an external firewall network like Sophos, so we need to set a proxy to connect internet. issues happen when we are using the command line. we can't see any sign about our internet working or not. first, ping google or any website to check the internet connection. I faced the same issue.

1
  • If you can expand this explaining in a bit more detail what a user may have to do I think this could be an interesting answer. At the moment though it feels more like a comment than an answer.
    – fossfreedom
    Dec 3, 2021 at 16:06
-1

I add my solution for this same error in case somebody else is in my same situation.

In my case the problem was a mistake in /etc/hosts configuration.

I commented everything in the file and then it worked again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .