1

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.

  • 1
    Does network works well? Did you try to ping something to see if it can reach any external server? – Bardyl May 2 '18 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. – pyromaniackeca May 2 '18 at 13:00
  • Disable ipv6. Details of how is described in this answer – L. D. James May 2 '18 at 13:22
  • Thanks, but still no progress. – pyromaniackeca May 2 '18 at 13:38
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.

  • so marking this as solution resp. accepted answer would make sense! – DJCrashdummy May 3 '18 at 2:44
  • And how did you figure out which source was at fault? This answer is uninformative. – Pithikos Nov 8 '19 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. – pyromaniackeca Nov 9 '19 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.

  • 1
    and what happened then? – Pierre.Vriens Dec 6 '18 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." – Ali Dec 7 '18 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." – Ali Dec 7 '18 at 3:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.