0

When I try to do sudo apt update it idles with a 0% [Waiting for headers] [Waiting for headers] message and does not run for a long while. After several minutes the terminal spits out a line indicating that the update got ignored. E.g.:

Ign:66 http://us.archive.ubuntu.com/ubuntu xenial-udates/universe i386 Packages

then moves on to the next one where the same thing happens again.

I've tried a couple of things including manually editing /etc/apt/sources.list based on this: Updating Ubuntu & understanding errors thrown by APT, change the mirror site based on this:Stuck at 0% [waiting for headers], and cleaning apt's history based on this: Ubuntu problems on update....:/

I'm on Ubuntu 16.04.4 LTS (xenial). I am behind a corporate firewall, but i have the proxy parameters set up in /etc/environment, /etc/sudoers and /etc/apt/apt.conf.d/95proxies according to this: How do I configure proxies without GUI?.

My internet seems to be connected, i can get ping responses from 8.8.8.8 or ubuntu.com.

I tried to do this with disabled firewall (ufw disable), with the same -negative- result.

I kinda out of the ideas here, any help is appreciated.

Geri
  • 1
  • Does the Ign line say udates or updates? If it says updates, please copy and paste the line into your question rather than typing it in. If it says udates, there's a line in your sources.list that should be changed from xenial-udates to xenial-updates. – Chai T. Rex Sep 26 '18 at 20:34
  • Also, does wget or curl work through your proxy to download the problematic URLs mentioned or does it wait for a long time for a response that never comes? Are there any lines that start with Err instead of Ign? – Chai T. Rex Sep 26 '18 at 20:37
  • it says updates and not udates. sorry for the typo, i had only a screenshot. i let it run overnight yesterday and since then I rebooted several times. All of the lines started with Ign no Err. ... I'm totally baffled, a just apt get update ran command again and now it's working seamlessly without me changing a single thing. – Geri Sep 26 '18 at 22:23

1 Answers1

0

If it doesn't work for a while and then it starts working with no changes by you, that generally happens because either the download server or the network between you and the download server was down or having issues.

You can switch servers from the command line by using any of the answers to "How do I change mirrors in Ubuntu Server from regional to main?".


You can alternatively set up a mirror of all the repositories on your local network if your management is OK with that. This requires downloading and storing on disk every package in the repositories and redownloading each whenever it changes.

At the cost of all that bandwidth and disk space, this will allow you to set everyone's repository server to a server on your local network, which will be both fast-to-access and updated fairly well.

You can probably have IT punch a hole in the firewall for this only during hours when the office is closed so that this doesn't use bandwidth during working hours.

Chai T. Rex
  • 5,193
  • Thanks for the info. This has happened before before but it did not take such a long time to get updates. Thanks for the advice! – Geri Sep 28 '18 at 19:02