Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apt-get update not working #5142

Closed
Acenl12 opened this issue Apr 27, 2020 · 33 comments
Closed

apt-get update not working #5142

Acenl12 opened this issue Apr 27, 2020 · 33 comments

Comments

@Acenl12
Copy link

Acenl12 commented Apr 27, 2020

Ubuntu 18.04 WSL

Please help fix this

sudo apt-get update
[sudo] password for guido:
Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease
  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.142), connection timed out
Err:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable)
Err:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable)
Err:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
  Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.142), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to archive.ubuntu.com:80 (91.189.88.142), connection timed out
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease  Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable)
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.142), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.
@PrakharUniyal
Copy link

Hi @guidovbrakel , this seems like a network issue to me. Can you check and tell whether the internet is working? Try running this command and share your output:

get --spider google.com

@aaemon
Copy link

aaemon commented May 1, 2020

Hi @guidovbrakel , this seems like a network issue to me. Can you check and tell whether the internet is working? Try running this command and share your output:

get --spider google.com

wsl2 internet not working, but wsl1 working fine. I tried reinstalling windows, same issue.

@Acenl12
Copy link
Author

Acenl12 commented May 2, 2020 via email

@dhikrahashim
Copy link

Is this issue fixed? Same error for me also. but ping to google.com is working for me.

Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Connection failed [IP: 2001:67c:1562::15 80]
Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Connection failed [IP: 2001:67c:1562::18 80]
Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Connection failed [IP: 2001:67c:1562::15 80]
Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Connection failed [IP: 91.189.88.142 80]
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Connection failed [IP: 2001:67c:1562::18 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Connection failed [IP: 2001:67c:1562::15 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Connection failed [IP: 91.189.88.142 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Connection failed [IP: 2001:67c:1562::15 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

==================================
ping google.com
PING google.com(maa05s03-in-x0e.1e100.net (2404:6800:4007:80d::200e)) 56 data bytes
64 bytes from maa05s03-in-x0e.1e100.net (2404:6800:4007:80d::200e): icmp_seq=1 ttl=54 time=93.8 ms
64 bytes from maa05s03-in-x0e.1e100.net (2404:6800:4007:80d::200e): icmp_seq=2 ttl=54 time=129 ms

@Acenl12
Copy link
Author

Acenl12 commented May 10, 2020

Is this issue fixed? Same error for me also. but ping to google.com is working for me.

Err:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Connection failed [IP: 2001:67c:1562::15 80]
Err:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Connection failed [IP: 2001:67c:1562::18 80]
Err:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Connection failed [IP: 2001:67c:1562::15 80]
Err:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Connection failed [IP: 91.189.88.142 80]
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Connection failed [IP: 2001:67c:1562::18 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Connection failed [IP: 2001:67c:1562::15 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Connection failed [IP: 91.189.88.142 80]
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Connection failed [IP: 2001:67c:1562::15 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

==================================
ping google.com
PING google.com(maa05s03-in-x0e.1e100.net (2404:6800:4007:80d::200e)) 56 data bytes
64 bytes from maa05s03-in-x0e.1e100.net (2404:6800:4007:80d::200e): icmp_seq=1 ttl=54 time=93.8 ms
64 bytes from maa05s03-in-x0e.1e100.net (2404:6800:4007:80d::200e): icmp_seq=2 ttl=54 time=129 ms

Yes for me it's fixed.

@Acenl12 Acenl12 closed this as completed May 10, 2020
@jameshfisher
Copy link

I have the exact same issue - how did you fix it @guidovbrakel?

@DipanjaliNaik
Copy link

@jameshfisher
Did the issue get fix for you. Even I am facing same problem.

@mrcat323
Copy link

mrcat323 commented Sep 8, 2020

@jameshfisher @aaemon @dhikrahashim @PrakharUniyal guys I have fix here. Just while running apt-get update or something just add -o Acquire::ForceIPv4=true something like:
apt-get update -o Acquire::ForceIPv4=true
but to solve this problem permanently create a file with 99force-ipv4 in /etc/apt/apt.conf.d/ directory and add following stuff:
Acquire::ForceIPv4 "true";

@khairaf
Copy link

khairaf commented Sep 15, 2020

run this command doesn't work for me

apt-get update -o Acquire::ForceIPv4=true

@courteous
Copy link

In my case it was the problem related to the configuration of the /etc/apt/sources.list. All the packages was configured for https and when i visited http://91.189.91.39/ over Firefox i realized that this site does not support https at all. then i changed to some other mirror any that support https i.e. from the list below and it all worked. https://launchpad.net/ubuntu/+archivemirrors

@eldano1995
Copy link

Checkout my comment: maybe it helps: #5061 (comment)

@lbiru
Copy link

lbiru commented Feb 3, 2021

In my case it was the problem related to the configuration of the /etc/apt/sources.list. All the packages was configured for https and when i visited http://91.189.91.39/ over Firefox i realized that this site does not support https at all. then i changed to some other mirror any that support https i.e. from the list below and it all worked. https://launchpad.net/ubuntu/+archivemirrors

Thank you.
This solution work for me.

@Rajkgokeda
Copy link

In my case it was the problem related to the configuration of the /etc/apt/sources.list. All the packages was configured for https and when i visited http://91.189.91.39/ over Firefox i realized that this site does not support https at all. then i changed to some other mirror any that support https i.e. from the list below and it all worked. https://launchpad.net/ubuntu/+archivemirrors

After applying various solutions available in google for the whole day, this is the one worked for me. Thank you so much.

@msaadegh
Copy link

i had same issue and resolve with disabling my anti virous application( symantec endpoint )

@ElAmen
Copy link

ElAmen commented Jan 1, 2022

i had same issue and resolve with disabling my anti virous application( symantec endpoint )

This works for me. Thanks

@krogge-obando
Copy link

i had same issue and resolve with disabling my anti virous application( symantec endpoint )

This worked for me thanks for sharing!

@fahadmeraj
Copy link

fahadmeraj commented Feb 7, 2022

disabling the symantec end protection anti virus resolved the issue for me. I had the same issue that internet was on and DNS was configured but still I was unable to connect to the repos of Ubuntu

Edit:
After disabling the antivirus, the issue got solved for a while but then again the issue persists, ultimately, I have deleted the antivirus and checking the response

@serup
Copy link

serup commented Mar 3, 2022

disabling the antivirus is definitely not recommended - find another way

@IAmTahazzot
Copy link

In my case it was the problem related to the configuration of the /etc/apt/sources.list. All the packages was configured for https and when i visited http://91.189.91.39/ over Firefox i realized that this site does not support https at all. then i changed to some other mirror any that support https i.e. from the list below and it all worked. https://launchpad.net/ubuntu/+archivemirrors

After applying various solutions available in google for the whole day, this is the one worked for me. Thank you so much.

Can you please help me to get through all of this steps :( I am so new here. I need wsl2 badly, I am stuck with this problem for about more than 6 month. Please.

@fnhirwa
Copy link

fnhirwa commented May 29, 2022

I had the same issue and was resolved by editing

/etc/apt/sources.list

I replaced all

http://xx.archive.ubuntu.com/ubuntu... with http://archive.ubuntu.com/ubuntu ...

and it worked out.

You can try it

@fahadmeraj
Copy link

fahadmeraj commented May 29, 2022 via email

@IAmTahazzot
Copy link

Thank you

Has it worked?

@Aprime98
Copy link

It worked ...
Navigate to sudo visudo /etc/apt/sources.list to change where apt gets the packages and save after changing.

@bkoprivica
Copy link

get --spider google.com

I had the same issue and was resolved by editing

/etc/apt/sources.list

I replaced all

http://xx.archive.ubuntu.com/ubuntu... with http://archive.ubuntu.com/ubuntu ...

and it worked out.

You can try it

I do not have xx.archive but archive... It did not resolve the issue.

@bkoprivica
Copy link

-o Acquire::ForceIPv4=true

it doesn't work

@bkoprivica
Copy link

Client Hyper-V role

My Hyper-V feature is not selected, but the issue persist.

@Cheran-VG
Copy link

i had same issue and resolve with disabling my anti virous application( symantec endpoint )

Thanks, disabling Symantec worked for me.

@fahadmeraj
Copy link

fahadmeraj commented Oct 11, 2022 via email

@Danrancan
Copy link

Hi @guidovbrakel , this seems like a network issue to me. Can you check and tell whether the internet is working? Try running this command and share your output:

get --spider google.com

i believe the correct command is:

wget --spider google.com

@Bang1338
Copy link

Solution

  • Disable your god damn antivirus firewall

Wise word to ESET: why

@manwarhussain
Copy link

Err:7 https://download.mono-project.com/repo/ubuntu vs-bionic InRelease
Could not connect to 121.0.0.0:443 (121.0.0.0). - connect (110: Connection timed out)

@Bang1338
Copy link

Bang1338 commented Feb 8, 2024

Err:7 https://download.mono-project.com/repo/ubuntu vs-bionic InRelease Could not connect to 121.0.0.0:443 (121.0.0.0). - connect (110: Connection timed out)

try using vpn

@aquibmir
Copy link

Allowing OG traffic to archives in my AV software solved the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests