Can't connect to ubuntu archive when using apt-get update

11,351

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
Share:
11,351

Related videos on Youtube

DorkOrc
Author by

DorkOrc

Updated on September 18, 2022

Comments

  • DorkOrc
    DorkOrc over 1 year

    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.

    • soufrk
      soufrk about 6 years
      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.
  • CpILL
    CpILL about 4 years
    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