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

Can't apt-get update Kali Linux in WSL #7491

Closed
1 of 2 tasks
gasayminajj opened this issue Oct 5, 2021 · 7 comments
Closed
1 of 2 tasks

Can't apt-get update Kali Linux in WSL #7491

gasayminajj opened this issue Oct 5, 2021 · 7 comments

Comments

@gasayminajj
Copy link

gasayminajj commented Oct 5, 2021

Windows Build Number

Version 10.0.19042.1237

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.16

Distro Version

Linux DESKTOP-5UAV41V 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 GNU/Linux

Other Software

No response

Repro Steps

I can't install anything in kali, but ubuntu works. Please help me!

Expected Behavior

изображение

Actual Behavior

sudo apt-get update
[sudo] password for gasay:
Ign:1 http://http.kali.org/kali kali-rolling InRelease
Ign:2 http://http.kali.org/kali kali-experimental InRelease
Ign:1 http://http.kali.org/kali kali-rolling InRelease
Ign:2 http://http.kali.org/kali kali-experimental InRelease
Ign:1 http://http.kali.org/kali kali-rolling InRelease
Ign:2 http://http.kali.org/kali kali-experimental InRelease
Err:1 http://http.kali.org/kali kali-rolling InRelease
Temporary failure resolving 'http.kali.org'
Err:2 http://http.kali.org/kali kali-experimental InRelease
Temporary failure resolving 'http.kali.org'
Reading package lists... Done
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease Temporary failure resolving 'http.kali.org'
W: Failed to fetch http://http.kali.org/kali/dists/kali-experimental/InRelease Temporary failure resolving 'http.kali.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.

Diagnostic Logs

No response

@0eN
Copy link

0eN commented Oct 26, 2021

i have the same issue :(

@MJ-EMIS
Copy link

MJ-EMIS commented Nov 4, 2021

Found that the issue is due to the WSL image referring to loopback to get DNS routed via the host machine and something like Next Gen-AV is getting in the way of allowing the DNS resolution (so much for next gen-av being "smart".)

How I fixed it was to point to a different DNS and you can do it by doing the following:

  1. Run sudo nano /etc/resolv. conf to change the target DNS server
  2. In nano overwrite the listed IP (this will be the WSL loopback IP) to your preferred DNS e.g. local DNS server, internet gateway/router or public DNS
  3. Press Ctrl+X to exit
  4. When prompted press Y and enter to commit write
  5. When prompted for filename hit enter to overwrite original file
  6. Run sudo apt-get update again

@CelvinBraun
Copy link

CelvinBraun commented Dec 22, 2021

Had the same issue. Was trying out following things: https://kalitut.com/how-to-update-kali-linux-and-fix-update/ (Those could solve the issue)
-> At the end the instance decided to magically work, after several times unregistering it and rebooting Windows!

@psytran
Copy link

psytran commented Jan 15, 2022

even i tried but no use the app is telling error like this

┌──(pnvs㉿LAPTOP-0TJ1JHA7)-[~]
└─$ sudo apt update
Ign:1 http://http.kali.org/kali kali-last-snapshot InRelease
Ign:1 http://http.kali.org/kali kali-last-snapshot InRelease
Ign:1 http://http.kali.org/kali kali-last-snapshot InRelease
Err:1 http://http.kali.org/kali kali-last-snapshot InRelease
Temporary failure resolving 'http.kali.org'
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://http.kali.org/kali/dists/kali-last-snapshot/InRelease Temporary failure resolving 'http.kali.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.

┌──(pnvs㉿LAPTOP-0TJ1JHA7)-[~]
└─$

@OneBlue
Copy link
Collaborator

OneBlue commented May 3, 2022

/dupe #8365

@ghost
Copy link

ghost commented May 3, 2022

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

@ghost ghost closed this as completed May 3, 2022
@ghost ghost added the duplicate label May 3, 2022
@BrijeshJagad
Copy link

By changing repo form,

deb http://http.kali.org/kali kali-rolling main non-free contrib

to ,

deb https://http.kali.org/kali kali-rolling main non-free contrib

( secure HTTPS)
in file /etc/apt/sources.list fixed my issue.

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

No branches or pull requests

7 participants