Facing Archive Canonical Repository Issues? Here’s Your IPv6 Solution!
Understanding the IPv6 Connection Hurdle
When updating the repositories, I found a recurring issue: the system’s reluctance to connect through IPv6 on archive.canonical.com. This not only led to extended wait times but also culminated in a frustrating connection error. Disabling IPv6 seems like the go-to remedy, but it’s akin to using a sledgehammer to crack a nut
Prioritizing IPv4: The Seamless Workaround
By tweaking a few settings, it’s possible to give precedence to IPv4 over IPv6, ensuring smoother updates without sacrificing the benefits of either protocol.
Step-by-Step Tutorial:
- Access the System Configuration:
Utilize the command:
sudo nano /etc/gai.conf
- Spot the Crucial Line:
Find the line:
#precedence ::ffff:0:0/96 100
- Activate the Line:
Uncommenting this line is the key to setting the desired precedence. Now, even if a resource supports both IPv6 and IPv4, our system will favor IPv4.
Retain Both Protocols, Enjoy Hassle-free Updates
Don’t compromise on functionality. With this simple adjustment, embrace the perks of IPv6 and IPv4 without the update hassles.