在Windows下安装Linux系统时,安装成功后,点击启用,命令行窗口中报错:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8007019e
The Windows Subsystem for Linux optional component is not enabled. Please enable it and try again.
See https://aka.ms/wslinstall for details.
Press any key to continue...

当敲下任意键时,窗口闪退。

解决方法如下

Step1:打开控制面板:

 Step2:选择“程序与功能”: Step3:点击“启用或关闭Windows功能​​​​​​​”:

 Step4:勾选“适用于Linux的Windows子系统​​​​​​​”,之后会要求电脑重启后才有效:

 

  Step5:再次运行时显示“Installing...”,之后就可以输入用户名

(PS:我这里第一次设置用户名时出现了一个报错

Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers

原因是用户名中的首字母大写了,改成小写就可以了)

根据提示输入用户名和密码就可以正常运行啦~~

 

 

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐