2

Running sudo apt-get update always get's stuck on 0% [Working] Here's an example log:

➜  ~ sudo apt-get update
Hit:1 http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu xenial 
InRelease
Hit:2 http://security.ubuntu.com/ubuntu xenial-security InRelease                                                                                                                                
Hit:3 http://repo.entroware.com/ubuntu xenial InRelease                                                                                                                                          
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                          
Hit:5 http://archive.ubuntu.com/ubuntu xenial-proposed InRelease                                                                                
Hit:6 http://gb.archive.ubuntu.com/ubuntu xenial InRelease                                                                
Hit:7 http://ppa.launchpad.net/webupd8team/atom/ubuntu xenial 
InRelease                             
Hit:8 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease                            
Hit:9 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease    
Hit:10 http://dl.google.com/linux/chrome/deb stable Release
0% [Working]                                       

It tends to get stuck on the same step multiple times in a row, but tends to change which step that is.

I've tried forcing IPv4 as well as changing to the default mirror with no success. I also can't seem to find any logs for this as tailing the /var/log/apt/term.log doesn't give me anything.

One thing to note is that switching mirror also changed the step it got stuck at.

4
  • 1
    Does network works well? Did you try to ping something to see if it can reach any external server?
    – Bardyl
    May 2, 2018 at 12:49
  • I've tried pinging gb.archive.ubuntu.com and security.ubuntu.com successfully. I don't thing the network is the issue. I've tried 3 different networks just to be sure. May 2, 2018 at 13:00
  • Disable ipv6. Details of how is described in this answer May 2, 2018 at 13:22
  • Thanks, but still no progress. May 2, 2018 at 13:38

2 Answers 2

2

It ended up being a problem with one of the sources. Specifically removing this line from /etc/apt/sources.list fixed it: deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable.

After that I ran clean, autoclean and followed this guide which added the same source back in after which point it continued working.

Hopefully this will be useful if someone encounters the same problem.

3
  • so marking this as solution resp. accepted answer would make sense! May 3, 2018 at 2:44
  • And how did you figure out which source was at fault? This answer is uninformative.
    – Pithikos
    Nov 8, 2019 at 10:42
  • @Pithikos Informed assumptions + trial and error, I guess I could have made it explicit. In any case I don't have something I'd describe as a good approach. Nov 9, 2019 at 11:19
0

Faced with the same problem, ran gksudo gedit /etc/apt/sources.list. Was no deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable.

Generated standard sources from here and replaced in the sources.list.

3
  • 1
    and what happened then? Dec 6, 2018 at 19:49
  • @Pierre.Vriens it continues the process to the end and prints "AppStream cache update completed, but some metadata was ignored due to errors."
    – User122
    Dec 7, 2018 at 3:19
  • Three lines of the messages are: "W: GPG error: download.virtualbox.org/virtualbox/debian xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A2F683C52980AECF W: The repository 'download.virtualbox.org/virtualbox/debian xenial InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use."
    – User122
    Dec 7, 2018 at 3:22

You must log in to answer this question.

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