Ubuntu apt-get Hangs At 0%

apt-get-stuck-0-percent

I had an issue where I installed Ubuntu 14.04 in VirtualBox and apt-get kept hanging at 0%.

I noticed it was automatically attempting to use IPv6 because normally apt-get says connecting to us.archive.ubuntu.com the IPv4 address (eg 0% connecting to us.archive.ubuntu.com 111.111.111.111). This time the address looked like version 6.

To force apt-get to use IPv4 exclusively

  1. Create a file in /etc/apt/apt.conf.d/99force-ipv4
  2. Add this line to newly created file Acquire::ForceIPv4 true;
  3. Apt-get will now use IPv4 exclusively

 

This article on StackExchange helped me find the right answer!
Convince apt-get *not* to use IPv6

Share this Story
  • Linux Tech Tips Ubuntu

    Ubuntu apt-get Hangs At 0%

    I had an issue where I installed Ubuntu 14.04 in VirtualBox and apt-get kept hanging at 0%. I noticed it was ...
Load More Related Articles
Load More By Nick Escobedo
  • Linux Tech Tips Ubuntu

    Ubuntu apt-get Hangs At 0%

    I had an issue where I installed Ubuntu 14.04 in VirtualBox and apt-get kept hanging at 0%. I noticed it was ...
Load More In Linux

Check Also

Laravel Sleep Facade and How To Write Tests Without Slowing Down Your Test Suite

Learn how to use the sleep facade and ...