Monday, February 26, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 411  / 1 Year ago, thu, march 2, 2023, 12:55:48

So I recently installed Ubuntu WSL1 in my company PC and ran this command to update my installation, It seems ping is successful but "apt-get" fails to connect and download. I need some help here to trouble shoot this


sudo apt-get update

I'm getting the following error:


Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Could not connect to security.ubuntu.com:80 (2001:67c:1562::18). - connect (111: Connection refused)
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Could not connect to archive.ubuntu.com:80 (2620:2d:4000:1::16). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (2620:2d:4000:1::19). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (111: Connection refused) Could not connect to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (111: Connection refused)


W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Could not connect to security.ubuntu.com:80 (2001:67c:1562::18). - connect (111: Connection refused)

W: Some index files failed to download. They have been ignored, or old ones used instead.

I tried to ping archive.ubuntu.com and it is showing me it's successful. but the apt-get update does not work ?


 ping archive.ubuntu.com

--- archive.ubuntu.com ping statistics ---
13 packets transmitted, 13 received, 0% packet loss, time 12010ms
rtt min/avg/max/mdev = 220.761/221.066/221.704/0.251 ms

More From » networking

 Answers
2

I believe I had the same problem a while ago.


I wasn't able to ascertain why this was happening, but the solution I was recommended was this:



  1. Make a backup of /etc/apt/sources.list



  2. inside that file, replace the string archive.ubuntu.com with si.archive.ubuntu.com (I use "si" to download from slovenian archive - find a mirror closest to you)



  3. Run apt-get update




[#30] Friday, March 3, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
homerurhyth

Total Points: 338
Total Questions: 113
Total Answers: 105

Location: Moldova
Member since Sat, Aug 6, 2022
2 Years ago
;