failed-installation - wsl --set-default-version 2 服务无法启动,要么是因为它被禁用,要么是因为它没有与之关联的启用设备
问题描述
我正在尝试使用 WSL2 在我的 Windows 10 Home Version 20H2 OS Build 19042.685 上再次安装 Ubuntu。
问题是 WSL2 安装未完成。我在执行第 5 步时收到以下消息 - 将 WSL 2 设置为您的默认版本
PS C:\WINDOWS\system32> wsl
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
之前完成的步骤:
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Deployment Image Servicing and Management tool
Version: 10.0.19041.572
Image Version: 10.0.19042.685
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Deployment Image Servicing and Management tool
Version: 10.0.19041.572
Image Version: 10.0.19042.685
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
PS C:\WINDOWS\system32>
然后我重新启动了 Windows 并
execute wsl_update_x64.msi
解决方案
我遇到过同样的问题
C:\WINDOWS\system32> wsl --set-default-version 2
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
问题是卡巴斯基。解决方法很简单打开cmd.exe,运行如下代码
sc config LxssManager start=auto
卡巴斯基会给你一个关于潜在线程的弹出窗口。告诉卡巴斯基忽略警报。请不要单击卡巴斯基的“修复它”按钮,否则您将撤消解决方案。
那应该解决它
推荐阅读
- azure-bot-service - 无法注册新的机器人服务:获取“MsaAppId:MsaAppId 已在使用中..”
- python - 基本python IO,请melp了解文件目录使用。
- c# - “在对象未被反序列化时调用了 OnDeserialization 方法。” 从哈希表反序列化
- regex - 使用正则表达式转换日期 1/1/18 -> 2018-01-01
- excel - VBA Excel 使用最近日期的行
- list - 如何从 Netlogo 上的列表中删除重复的子列表
- javascript - 输入 0 未定义堆栈:引用错误
- ibm-watson - 无法从 audio/l16;rate=48000;channel=1 转码为以下之一:audio/x-float-array; 率=16000;频道=1,
- python - Pandas .astype(str).sum() 带分隔符
- angular - ts 从 json 创建 rest api 接口存根