2

WSL 网络突然不可用了,真的是得远离瘟到死

 2 years ago
source link: https://www.v2ex.com/t/808578
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  Windows

WSL 网络突然不可用了,真的是得远离瘟到死

  kischang · 2 小时 47 分钟前 · 1100 次点击
之前一切正常,最近也没有安装啥更新的
突然间今天发现开发工具连不上 WSL 里的 mysql 了,遂进去检查,发现 wsl 里的网络没有了
没有到 Ubuntu 报的是没有网络设备
什么重置网络、重新启用 Linux 子系统,全都试了没用
wsl 也没有 netplan 、networking 什么乱七八糟的东西,网络都是不能配置的,也不能重启相关网络服务
真的不知道怎么操作了

瘟到死真的是

第 1 条附言  ·  2 小时 9 分钟前

谢谢大家得帮助,我最终通过 Google + stackoverflow 解决了问题
解决方法是 Disable swap
在 windows 中添加如下文件 %userprofile%.wslconfig,内容是:

[wsl2]
swap=0

但具体是因为什么原因导致的,还不清楚

第 3 条附言  ·  38 分钟前

感谢 @weiceshi 的讲解

具体问题详情大家可以看#27 、#29 、#31 楼

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK