Skip to content

wsl.exe --list --online 报错:无法解析服务器的名称或地址 #8025

Closed
@qingyun2016

Description

@qingyun2016

Version

Microsoft Windows [版本 10.0.22543.1000]

WSL Version

  • WSL 2
    WSL 1

Kernel Version

5.10.81.1

Distro Version

No response

Other Software

No response

Repro Steps

wsl.exe --list --online
无法解析服务器的名称或地址

Expected Behavior

wsl_error

Actual Behavior

I got this error when list linux version use wsl --list --online

Diagnostic Logs

No response

Activity

deleted a comment from eqn-grp on Feb 8, 2022
craigloewen-msft

craigloewen-msft commented on Feb 8, 2022

@craigloewen-msft
Member

@equation-group please see our Code of Conduct for interacting with users on this repo.

craigloewen-msft

craigloewen-msft commented on Feb 8, 2022

@craigloewen-msft
Member

This seems like an internet connection issue from what you posted, can you please check your network connection and provide logs?

/logs

ghost

ghost commented on Feb 8, 2022

@ghost

Hello! Could you please provide more logs to help us better diagnose your issue? You can find instructions on how to attach logs here, please make sure to post the link to the Feedback Hub item in this chat so we can see it.

Thank you!

ghost closed this as completedon Feb 15, 2022
ghost

ghost commented on Feb 15, 2022

@ghost

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it.

Thank you!

shuohao

shuohao commented on May 23, 2022

@shuohao

i have same issue.

shuohao

shuohao commented on May 23, 2022

@shuohao

Version

Microsoft Windows [版本 10.0.22543.1000]

WSL Version

  • WSL 2
    WSL 1

Kernel Version

5.10.81.1

Distro Version

No response

Other Software

No response

Repro Steps

wsl.exe --list --online 无法解析服务器的名称或地址

Expected Behavior

wsl_error

Actual Behavior

I got this error when list linux version use wsl --list --online

Diagnostic Logs

No response

老哥 你的解决了吗 我遇到一样的问题

dbgee

dbgee commented on Sep 23, 2022

@dbgee

image

same issue

qinshuze

qinshuze commented on Sep 24, 2022

@qinshuze

我遇到了同样的问题,这似乎是DNS引起的,在我修改了DNS之后,该问题得到解决
image

qingyun2016

qingyun2016 commented on Sep 24, 2022

@qingyun2016
Author
qingyun2016

qingyun2016 commented on Sep 24, 2022

@qingyun2016
Author

统一回复下如何解决方案:

  1. 执行wsl --list --online时wsl会到raw.githubusercontent.com这个接口去取已经支持的的linux版本,如果报错,那就说明这个地址访问不了,这个时候你可以到https://ipaddress.com这个网站,将“raw.githubusercontent.com”查询到服务器地址有四个

image

2.接下来从查到的4个地址,在你电脑上ping 查到的地址 -t,看哪个地址能连接上
3.然后再将这个ping通的这个地址配置的你的hosts文件当中:添加“185.199.108.133(我这里这个地址能ping通,你们的填自己能ping通的) raw.githubusercontent.com”就可以了:

image

wufeng87

wufeng87 commented on Apr 3, 2023

@wufeng87

谢谢分享 开启wsl2
删除appdata下所有Docker目录,然后重启应用就好了

yuanshun-guo

yuanshun-guo commented on Jul 7, 2023

@yuanshun-guo

You can access it by connecting to the VPN, I have resolved it

bGZo

bGZo commented on May 24, 2024

@bGZo

TL;DR: Go ms-settings:network-proxy

我试了 export http_proxy, $env:http_proxy, Proxifier,全都没用,最后发现设置一下系统代理就能 install,OMG, So mess window is!

mydaoyuan

mydaoyuan commented on Jun 7, 2024

@mydaoyuan

china shit network

javascripet

javascripet commented on Jan 19, 2025

@javascripet

垃圾ccp这也封那也封

Darrenpig

Darrenpig commented on Jan 19, 2025

@Darrenpig

解决了,兄弟们。修改代理(其实不算是被墙,准确来说是域名污染,就像访问GIthub可以直接改host一样)

Clash配置问题,之前由于图省事放弃了winget,打开微软商店,也是调试了半天(Clash里关闭了系统模式)

Image
这个是前后的对比图打印

  • 错误代码: Wsl/Service/CreateInstance/GetDefaultDistro/WSL_E_DEFAULT_DISTRO_NOT_FOUND
  • 成功代码:以下是可安装的有效分发的列表。使用 'wsl.exe --install ' 安装。......

具体实现步骤:

1.打开 Clash

2.修改 Clash 系统代理【system proxy】

Image
再次打开cmd,输入wsl.exe --list --online 即可,看见前面的打印

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @wufeng87@shuohao@javascripet@mydaoyuan@qingyun2016

        Issue actions

          wsl.exe --list --online 报错:无法解析服务器的名称或地址 · Issue #8025 · microsoft/WSL