48

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.

Zanna
  • 72,312
Architect
  • 1,191

6 Answers6

61

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?

Kulfy
  • 18,154
Architect
  • 1,191
29

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
Kulfy
  • 18,154
Haseeb
  • 291
12

In ubunto Server Change Dns to 8.8.8.8

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

It Works

ee406621
  • 121
  • 1
  • 2
0

Change the apt source in /etc/apt/sources.list( < ubuntu24) and in /etc/apt/sources.list.d/ubuntu.sources (ubuntu24).

Find a source mirror: https://launchpad.net/ubuntu/+archivemirrors

Then

sudo apt update
Yan
  • 71
-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

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.

Tommimon
  • 153