Ubuntu apt-get is getting stuck

Linode Staff

When I try to run apt-get update it can't make a connection and gets stuck. How do I fix this?

1 Reply

This is a known issue with security.ubuntu.com. Apt-get will try to retrieve the updates over IPv6, but their server doesn't support IPv6. The connection eventually times out and fails.

To fix this, you can run the following command to force apt-get to use IPv4 instead:

echo 'Acquire::ForceIPv4 "true";' | tee /etc/apt/apt.conf.d/99force-ipv4

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct