安装 WSL 报错 Error code: Wsl/WININET_E_NAME_NOT_RESOLVED 问题解决

问题描述

在执行 wsl --install 安装Windows子系统Linux WSL (Windows Subsystem for Linux) 时报错:

无法从“https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json”中提取列表分发。无法解析服务器的名称或地址
Error code: Wsl/WININET_E_NAME_NOT_RESOLVED

解决方案

访问 https://www.sojson.com/ip/ 查询 raw.githubusercontent.com 域名对应的 IP 地址为 185.199.109.133

在这里插入图片描述
通过 SwichHosts 工具添加域名映射

185.199.109.133 raw.githubusercontent.com

再次执行 wsl --install 安装 WSL 就 ok 了。
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/u013737132/article/details/136280824
wsl