修复 1 – 禁用和启用 Linux 子系统

1. 按键盘上的Windows 和 R键打开运行。

2. 键入optionalfeatures.exe以启动Windows 功能。

如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e 如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e

3. 在Turn Windows Feature On and Off窗口中,您需要禁用所有与虚拟机相关的选项。

  • 找到Hyper-V并取消选中它旁边的框。

如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e 如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e

  • 取消选中Windows Subsystem for Linux选项。
  • 此外,通过取消选中与其关联的框来禁用虚拟机平台选项。
  • 如果您有Windows 管理程序平台,则也将其禁用。

如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e 如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e

4. 单击确定。此时,Windows 功能会查找所需文件并进行更改。

5. 在确认提示中,单击立即重新启动以重新启动您的 PC。

如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e 如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e

6.你的系统重新启动后,回到Windows功能在步骤1和2 ,并使得所有上述选项检查与之相关的框。

7.重新启用后再次重新启动您的 PC。

8. 检查您是否能够在没有错误的情况下启动 Linux 发行版。

修复 2 – 通过 PowerShell 启用 Linux 子系统

1. 按Windows键并在搜索框中键入powershell。

2.右键单击搜索结果上的PowerShell,然后单击以管理员身份运行。

如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e 如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e

3. 如果用户访问控制提示,单击是。

4. 键入以下命令并按Enter。

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

5、命令执行后提示重启。按Y重新启动 PC 以完成操作。

如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e 如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e

6. 启动后检查错误是否解决。

修复 3 – 通过命令提示符更新 Linux 子系统

1. 按Windows键并在搜索框中键入cmd。

2.右键单击在命令提示符,然后选择以管理员身份运行。

如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e 如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e

3. 使用以下命令更新 Linux 发行版。

C:> bash

$ sudo apt-get update

$ sudo apt-get dist-upgrade

$ <CTRL-D>

C:> exit

4.现在打开Linux终端并检查错误是否解决。

修复 4 – 重新安装适用于 Linux 的 Windows 子系统 (WSL)

如果上述两个修复程序都没有为您清除 Linux 发行版的错误,那么您需要卸载并重新安装 WSL,因为 WSL 本身可能存在问题。

A. 卸载 Linux Distribution 和 Windows Subsystem for Linux

1. 只需同时按住Windows 和 R键即可打开“运行”对话框。

2. 键入ms-settings:appsfeatures以在Windows 设置中打开应用和功能。

如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e 如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e

3.在应用程序列表中找到您的Linux 安装(例如 Ubuntu)。

4. 单击它旁边的三个垂直点并选择卸载。

如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e 如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e

5. 按照屏幕上的说明完成卸载。

6. 现在在应用程序列表中找到适用于 Linux 的 Windows 子系统。

7. 单击与其关联的三个垂直点,然后单击“卸载”。

如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e 如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e

8. 卸载后,使用Windows 功能删除 WSL 的所有关联文件和组件。按照中的步骤修复1至禁用WSL和Windows管理程序平台。

9.重新启动系统,然后安装 WSL。

B. 为 Linux 安装 Windows 子系统

Windows 10 2004 及以上版本或 Windows 11

1. 按下Windows 和 R键并在打开的运行对话框中输入powershell。

2. 按Ctrl + Shift + Enter以管理员身份打开PowerShell

如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e 如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e

3. 输入以下命令。

wsl --install

4. 下载最新版本的Linux,同时开启Linux子系统运行所需的可选组件。

5.命令执行后重启电脑。

6. 重新安装您之前卸载的 Linux 软件。启动您的 Linux 终端并检查错误是否已解决。

手动安装(而不是上面的安装命令)或旧版本的 Window

1. 打开运行 (Windows + R)。

2.输入powershell并按Ctrl + Shift + Enter以管理员身份打开命令提示符。

如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e 如何在 Windows 11 / 10 中修复 WslRegisterDistribution 失败并出现错误 0x8007023e

3.输入下面的命令

dism.exe /online / enable-feature /featurename: Microsoft-Windows - Subsystem-Linux /all /norestart

4.执行完上述命令后重新启动您的 PC。

5. 启动后,使用Windows Store 下载并安装您已卸载的Linux 发行版。

6. 启动 Linux 应用程序并检查问题是否已解决。