之前为了其他虚拟化软件如 VMware 或 VirtualBox 的旧版本能独占硬件虚拟化功能关闭了 Windows 的Hyper-V相关组件即“虚拟机平台”。现在要重新启用 WSL2必须把这些组件重新打开因为 WSL2 强依赖 Hyper-V 架构。报错详情解决方法依次运行以下命令如果提示需要重启先不要重启等所有都运行完dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestartdism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestartdism.exe /online /enable-feature /featurename:HypervisorPlatform /all /norestartbcdedit /set hypervisorlaunchtype Auto参考前三条命令是千问给的后面一条来自这位博主当前计算机配置不支持wsl2的解决方案_当前计算机配置不支持 wsl2-CSDN博客不知道哪个生效了反正WSL2好了