受限于系统没有微软商店,之前根据 https://learn.microsoft.com/zh-cn/windows/wsl/install 和网上的其他资料,以解压缩AppX的方式安装了Wsl Ubuntu 22.04。最近发现WSL 的Ubuntu 升级到了24.04LTS,尝鲜一下,尝试按照新版本。
同样的方式,下载 Ubuntu2404-240425.AppX,解压缩 Ubuntu_2404.0.5.0_x64.appx,运行 ubunt2404.exe文件,却遇到错误:
···
WslRegisterDistribution failed with error: 0x80070050
···
上网搜索了一下,CSDN的出错了,博客园上有个文章 解决了问题。记录一下:
···
Please backup (using the steps I mention in my previous answer) before trying this.
wsl --shutdown (from PowerShell or CMD)
In Windows, run the Registry Editor
Find \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss
Find the key in there that has DistributionName of Ubuntu20.04LTS. Change the Ubuntu20.04LTS to Ubuntu-20.04.
In theory, that may fix the problem by changing the distribution name back to what it should be.
···
他的参考资料是
https://askubuntu.com/questions/1401830/wsl-not-working-after-update-from-microsoft-store