因为需要更换wsl的ubuntu18.04到ubuntu20.04版本,选择了手动下载安装包解压缩运行,发现出现了错误
PS F:\wsl> .\ubuntu2004.exe
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070050
Error: 0x80070050 ?????
可以先查看一下状态
PS F:\wsl> wsl --list --verbose
NAME STATE VERSION
* Ubuntu-18.04 Stopped 2
原来的还没有删除,需要先删除之前的分发 wsl --unregister Ubuntu-18.04
PS F:\wsl> wsl --unregister Ubuntu-18.04
正在注销...
PS F:\wsl> wsl --list --verbose
适用于 Linux 的 Windows 子系统没有已安装的分发版。
可以通过访问 Microsoft Store 来安装分发版:
https://aka.ms/wslstore
之后再运行就可以创建了