Windows 10: apt not working wsl

Discus and support apt not working wsl in Windows 10 Gaming to solve the problem; wsl have internet access but apk not connecting... Discussion in 'Windows 10 Gaming' started by Pc X, Jul 11, 2023.

  1. Pc X Win User

    apt not working wsl


    wsl have internet access but apk not connecting

    :)
     
  2. AlexisH34 Win User

    WSL problem -- all wsl commands don't work

    Hello everyone,

    I got an issue with the windows subsystem for Linux (WSL).

    Context :

    I'm using a Windows 10 lap-top shared by my company

    How I got to the problem :

    - I first reinstall windows 10

    - I installed WSL through this link .

    - Everything was working though with the Ubuntu 20.04 installed though I wanted Ubuntu 22.04

    - When I was looking at wich distro I could install by using the command :

    wsl --list --online

    - So I was like, hey maybe, I could use the command wsl --update to update my wsl, maybe it was not fully updated. I was wrong, it was my Windows not updated.

    But anyway, I tried the command, it hungs, nothing was happening...
    - I Ctrl+C to stop the execution of the cmd ; from here I could not do any command in admin power-shell, it would just hung forever.

    - But I've seen that I could still use the command in User mode not admin, though I needed to launch the distro in admin mode otherwise I had a credential issue.

    - The thing is the WSL used in non-root mode was not updated

    I didn't have the new feature with the GUI which I need for my project.

    - So in non-root powershell, I did the update command:

    wsl --update

    - And now, I can have the GUI but at that point, in my distro. Every apt update, apt install commands don't work anymore.

    - So I have to uninstall wsl in user mode to use the apt install, and reinstall it everytime to have the GUI

    That's not really what I want. I obviously already tried to uninstall everything distro and WSL. By not forgetting to remove every windows features about virtual machine, wsl and the hypervisor.

    I used this method to uninstall WSL : here is the link

    And now after reinstalling wsl in root mode. Even after uninstalling it hung forever...

    Do you have any idea to have a WSL working without reinstalling again windows ?
     
    AlexisH34, Jul 11, 2023
    #2
  3. WSL 2 apt says network is unreachable

    I just set up a fresh install of Windows 10 on a brand new disk. I then followed

    this official guide
    for setting up WSL 2, and installed the latest Ubuntu (20.04) from the Microsoft Store. With this launching correctly, the first thing I tried was a `sudo apt update` so that I could start installing software, but this failed saying
    "Network is unreachable":


    apt not working wsl 46b7566a-54e6-48bb-aa33-e7887ba6cf91?upload=true.png


    I browsed the web for a solution and saw work that IPv6 could be the culprit, but even after disabling IPv6 on the WSL adapter and my ethernet adapter, the problem persists.

    I don't understand why installing WSL with the official instructions on a brand new install of Windows 10 would have any issues. I am unable to install any software in WSL due to this issue.
     
    chimpman252, Jul 11, 2023
    #3
  4. apt not working wsl

    How can I get DNS resolution working again under WSL?

    I installed WSL a couple days ago and was able to install several applications using apt. However, today when I attempted to install another one I got the message “Temporary failure accessing archive.ubuntu.com.” Experimentation shows that I can't ping any
    hostname under WSL, only IP addresses. So, .I can't successfully ping google.com but can ping its IP, 172.217.11.38. Hostname pings still work fine in regular PowerShell, just not under bash. I suspect this was caused by the installation of Windows 10 Home
    Edition Version 1803 yesterday. Any suggestions?
     
    OwenNewnan, Jul 11, 2023
    #4
Thema:

apt not working wsl

Loading...
  1. apt not working wsl - Similar Threads - apt working wsl

  2. apt not working wsl

    in Windows 10 Software and Apps
    apt not working wsl: wsl have internet access but apk not connecting https://answers.microsoft.com/en-us/windows/forum/all/apt-not-working-wsl/3b25b2b2-4295-495c-ac94-2cef4cb75360
  3. apt not working wsl

    in Windows 10 Network and Sharing
    apt not working wsl: wsl have internet access but apk not connecting https://answers.microsoft.com/en-us/windows/forum/all/apt-not-working-wsl/3b25b2b2-4295-495c-ac94-2cef4cb75360
  4. WSL Not Working

    in Windows 10 Gaming
    WSL Not Working: Hello,My WSL is not working on my laptop. It crashes immediately after running the Ubuntu app and trying to launch it in the command and PowerShell prompts. I have turned off the hypervisor feature and turned it back on. I have done the same for the virtual environment...
  5. WSL Not Working

    in Windows 10 Software and Apps
    WSL Not Working: Hello,My WSL is not working on my laptop. It crashes immediately after running the Ubuntu app and trying to launch it in the command and PowerShell prompts. I have turned off the hypervisor feature and turned it back on. I have done the same for the virtual environment...
  6. PC Health check Apt

    in Windows 10 Gaming
    PC Health check Apt: This computer has the AMD Ryzen 7 1700X 8 core processor. Upon checking the PC Health for compatibility check for windows 11 it comes up with a red X. When checking the compatibility check- The processor currently is not supported for windows 11. The health check list, my...
  7. PC Health check Apt

    in Windows 10 Installation and Upgrade
    PC Health check Apt: This computer has the AMD Ryzen 7 1700X 8 core processor. Upon checking the PC Health for compatibility check for windows 11 it comes up with a red X. When checking the compatibility check- The processor currently is not supported for windows 11. The health check list, my...
  8. WSL not working

    in Windows 10 Ask Insider
    WSL not working: WSL with Ubuntu 20.04 was working fine until I updated to version 20197.1000. After updating I'm unable to start a WSL shell or install a new distribution. I can't even access Linux folder in windows file explorer. I can't even install another version of Linux from the...
  9. WSL 2 apt says network is unreachable

    in Windows 10 Network and Sharing
    WSL 2 apt says network is unreachable: I just set up a fresh install of Windows 10 on a brand new disk. I then followedthis official guide for setting up WSL 2, and installed the latest Ubuntu 20.04 from the Microsoft Store. With this launching correctly, the first thing I tried was a `sudo apt update` so that I...
  10. Getting slow speed on apt get in Kali WSL 2 while Ubuntu WSL 2 works a lot better. And...

    in Windows 10 Ask Insider
    Getting slow speed on apt get in Kali WSL 2 while Ubuntu WSL 2 works a lot better. And...: Background: I am a noob, so sorry for any technical details I get wrong. I already had Ubuntu installed on WSL1, and it was pretty slow. Then I upgraded it to WSL2 and it got super fast. I needed Kali for learning pentesting and had a terrible experience while trying to dual...