4

I am trying to apt-get update but it gets stuck on

0% [Connecting to ph.archive.ubuntu.com (202.90.159.172)]

and after a couple of minutes it gives me the following:

Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]     
Hit:2 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu xenial InRelease
Err:3 http://ph.archive.ubuntu.com/ubuntu xenial InRelease                     
  Could not connect to ph.archive.ubuntu.com:80 (2001:d18:0:23::172). - connect (101: Network is unreachable) [IP: 2001:d18:0:23::172 80]
Err:4 http://ph.archive.ubuntu.com/ubuntu xenial-updates InRelease
  Unable to connect to ph.archive.ubuntu.com:http: [IP: 2001:d18:0:23::172 80]
Err:5 http://ph.archive.ubuntu.com/ubuntu xenial-backports InRelease
  Unable to connect to ph.archive.ubuntu.com:http: [IP: 2001:d18:0:23::172 80]
Fetched 102 kB in 2min 0s (846 B/s)                      
Reading package lists... Done
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Could not connect to ph.archive.ubuntu.com:80 (2001:d18:0:23::172). - connect (101: Network is unreachable) [IP: 2001:d18:0:23::172 80]
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Unable to connect to ph.archive.ubuntu.com:http: [IP: 2001:d18:0:23::172 80]
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Unable to connect to ph.archive.ubuntu.com:http: [IP: 2001:d18:0:23::172 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

I have tried disabling IPV6 connection as described here but it doesn't seem to fix the problem. What should I do? I'm an Ubuntu newb and using 16.04.

DorkOrc
  • 79
  • Same problem with in.archive.ubuntu.com or even archive.ubuntu.com. But surprisingly internet browser is working, ping and host -v resolution is working as well. – soufrk Mar 13 '18 at 11:27

1 Answers1

4

It seems that something is wrong with your mirrors.

If you run nslookup ph.archive.ubuntu.com you get the IP of server which is: 202.90.159.172, but if you try to ping it: ping ph.archive.ubuntu.com you're not going to get any response.

Also if you have look at Ubuntu mirrors list, you can see that this mirror does not exist there, I guess it's down for a while.

Change your mirrors, then update your sources.

A fast workaround is to use sed to change ph with us mirrors:

sudo sed -i s/ph.archive/us.archive/  /etc/apt/sources.list
Ravexina
  • 55,668
  • 25
  • 164
  • 183
  • I'm trying to do this in a Dockerfile and get '/bin/sh -c sudo sed -i s/us.archive/nz.archive/ /etc/apt/sources.list' returned a non-zero code: 127 – CpILL Feb 24 '20 at 04:45