Home > Common Problem > This is how to fix WSL error on Windows 11

This is how to fix WSL error on Windows 11

WBOY
Release: 2023-05-03 19:19:11
forward
14559 people have browsed it

WSL errors in Windows 11 can occur for a number of reasons. The exact message is WslRegisterDistribution Failed with a different error code.

Windows Subsystem for Linux (WSL) is a feature that allows developers and typical users to install and use Linux on their Windows computers.

While this feature is extremely valuable to developers, it can sometimes lead to mind-boggling complications that are difficult to fix.

Fortunately, these mistakes are not insurmountable. In this article, we will discuss all the possible causes and solutions.

What are the most common WSL errors in Windows 11?

WSL errors in Windows 11 include various codes and warnings; these are the most common:

  • WslRegisterDistribution failed with error: 0x80070032
  • WslRegisterDistribution failed with Occurred with error: 0x80370102
  • WslRegisterDistribution failed with error: 0x8007023e
  • WslRegisterDistribution failed with error 0x8007019e

Now that we have covered the error codes, let’s move into resolution plan.

How to fix Windows 11 WSL errors?

1. Fix WslRegisterDistribution Failed: 0x80070032 error

1.1 Scan your computer for malware

  1. Press Windows I key opens settings.
  2. Click Privacy & Security, and then in the right pane, select Windows Security. 这就是修复 Windows 11 的 WSL 错误的方法
  3. After that, click Virus & Threat Protection. 这就是修复 Windows 11 的 WSL 错误的方法
  4. Next, select Scan Options. 这就是修复 Windows 11 的 WSL 错误的方法
  5. Select Full Scan and click Scan Now.
  6. Let the scan complete.

The first thing to do when you receive Windows 11 WSL error code 0x80070032 is to scan your system for malware.

Antivirus software from companies like ESET is also a good choice due to their specialization in this area.

This anti-malware program ensures that your computer hard drive is not infected with any malware.

⇒Get ESET

1.2 Enable WSL

  1. Press the Windows key, then Type to turn Windows features on or off and click the result to turn it on.
  2. Locate Windows Subsystem for Linux and enable it. 这就是修复 Windows 11 的 WSL 错误的方法
  3. Click OK.
  4. Let it search and install the required system files, then restart your computer and check if the problem is resolved.

You can also enable WSL using Windows PowerShell by following these steps:

  1. Click on the Start menu, type Windows PowerShell, right-click on it and Select Run as administrator. 这就是修复 Windows 11 的 WSL 错误的方法
  2. Copy and paste the following code:
    <strong>Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux</strong> 这就是修复 Windows 11 的 WSL 错误的方法
  3. If necessary, type the following letters to restart the system: Y.

1.3 Enable the virtual machine

  1. Go to the Start menu and type Turn Windows features on or off and click on the result Turn it on.
  2. Find Virtual Machine Platform and enable it, then click OK. 这就是修复 Windows 11 的 WSL 错误的方法

Running WSL requires installing a virtual machine. If your system supports it, install it using Windows Features unless you encounter problems.

1.4 Fix file permission problem

  1. Press the Windows R key to open the "Run" dialog box.
  2. Type %localappdata%\Packages\ and press Enter. 这就是修复 Windows 11 的 WSL 错误的方法
  3. Locate the Distro folder, right-click it and select Properties.
  4. Go to the Security tab section and click on Advanced Options. 这就是修复 Windows 11 的 WSL 错误的方法
  5. Check if your account is on the list. If your account is on the list, proceed with the method below; if not, remove and reinstall WSL.

1.5 Restart the LxssManager service

  1. Press the Windows R key to openRun.
  2. Type Services.msc and press Enter. 这就是修复 Windows 11 的 WSL 错误的方法
  3. Find LxssManager, right-click it and select Stop. 这就是修复 Windows 11 的 WSL 错误的方法
  4. Restart WSL and check if the error disappears.

LxssManager controls distribution operations in the background. If the startup fails or is stuck in the process, you may receive the 0x80070032 error.

So, restarting the LxssManager service may solve this problem.

1.6 Launch WSL from Microsoft Store

  1. Press the Windows key to open the "Start" menu, and then type Microsoft Store and press Enter. 这就是修复 Windows 11 的 WSL 错误的方法
  2. Select My Library from the lower left corner of the app. 这就是修复 Windows 11 的 WSL 错误的方法
  3. Find Ubuntu and other Linux distribution applications, then click Launch and check if the problem is resolved.

Sometimes, Windows 11 WSL errors can occur due to bugs in the Linux distribution you have installed. To resolve this issue, you can restart the WSL distribution app from the Microsoft Store.

2. Use PC Repair Tools

It’s not uncommon for your computer to be the source of problems, which are easy to fix using third-party tools.

Restoro will analyze corrupted and missing files and repair them. This application will resolve the vast majority of cases when errors occur due to system corruption.

⇒Get Recovery

3. Fix WslRegisterDistribution Failed: 0x80040306 installation error

  1. Press Windows The R key opens the "Run" dialog box, and then type cmd.exe.
  2. Right-click the title bar and select Properties. 这就是修复 Windows 11 的 WSL 错误的方法
  3. Uncheck Use legacy console and click OK. 这就是修复 Windows 11 的 WSL 错误的方法

4. Fix WslRegisterDistribution Failed: 0x80370102 Error

Expert Tip: Some PC issues are difficult to resolve, especially if the repository is corrupted or When Windows files are lost. If you are having trouble fixing errors, your system may be partially corrupted. We recommend installing Restoro, a tool that can scan your machine and determine where the fault lies.
Click here to download and start repairing.

4.1 Enable Hyper-V

  1. Press the Windows key to open the "Start" menu, type to open or Turn off Windows features and press the Enter key.
  2. Find Hyper-V and enable it. 这就是修复 Windows 11 的 WSL 错误的方法
  3. Now, click OK.
  4. Restart your computer and check if the problem is resolved.

If you get Windows 11 WSL error code 0x80370102, the first thing you can do is enable Hyper-V. This is a required feature to use WSL.

4.2 Enable hardware virtualization

  1. Right-click the Start menu to open the Task Manager.
  2. Go to the Performance tab and check if virtualization is enabled. 这就是修复 Windows 11 的 WSL 错误的方法
  3. If Virtualization is not enabled, restart your computer and press the BIOS key immediately after the computer starts to enter your PC BIOS options. F1, F2, F10, F12, or DEL may be the BIOS key.
  4. Find the CPU Configuration section and enable Virtualization.

If you want to use Hyper-V powered WSL on your computer, you must turn on hardware virtualization.

4.3. Open the Virtual Machine Platform (VMP)

  1. Go to the Start menu and type Turn Windows features on or off, then click Enter.
  2. Find Virtual Machine Platform and enable it, then click OK. 这就是修复 Windows 11 的 WSL 错误的方法
  3. Wait for the installation to complete and restart your computer.

VMP is one of the necessary features that must be enabled to fix Windows 11 WSL error code 0x80370102.

5. Fix WslRegisterDistribution Failed: 0x8007023e error

5.1 Disable and enable Linux subsystem

  1. ClickStartMenu and type Turn Windows features on or off, then hit Enter. 这就是修复 Windows 11 的 WSL 错误的方法
  2. Uncheck Hyper-V, Windows Subsystem for Linux, Virtual Machine Platform, and Windows Hypervisor Platform and select OK. 这就是修复 Windows 11 的 WSL 错误的方法
  3. Restart your computer.
  4. Run Windows features again and enable them again.

5.2 Reinstall Windows Subsystem for Linux (WSL)

  1. Press Windows I key to open Settings .
  2. In the left pane, select Apps, and then click Apps & Features in the right pane. 这就是修复 Windows 11 的 WSL 错误的方法
  3. Find the Linux distribution (such as Ubuntu) in the list, click the three-dot option and select Uninstall. 这就是修复 Windows 11 的 WSL 错误的方法
  4. Allow the process to complete.
  5. After that, find Windows Subsystem for Linux in the list, click on the three-dot menu and select Uninstall. 这就是修复 Windows 11 的 WSL 错误的方法
  6. Follow the steps mentioned in the previous method to disable WSL and Windows Hypervisor Platform in Windows Features.
  7. Restart your computer and install WSL.

6. Fix WslRegisterDistribution Failed: 0x8007019e error

6.1 Use the terminal to update Linux

  1. Go to "Start " menu, type cmd and then right-click "Command Prompt" and select "Run as administrator". 这就是修复 Windows 11 的 WSL 错误的方法
  2. Type the following command in the command prompt and hit Enter to update the Linux distribution application:
C:\> bash$ sudo apt-get update$ sudo apt-get dist-upgrade$ C:\> exit
Copy after login

6.2 Repair the Linux Terminal Application

    ##Press the
  1. Windows I key to open Settings.
  2. In the left pane, click
  3. Apps, and then select Apps & features in the right pane. 这就是修复 Windows 11 的 WSL 错误的方法
  4. Find a
  5. Linux distribution application, such as Ubuntu, then click on the three dots and select Advanced Options. 这就是修复 Windows 11 的 WSL 错误的方法
  6. Scroll down the page to find the
  7. Repair option and click on it. 这就是修复 Windows 11 的 WSL 错误的方法
Check to make sure the error has been fixed, if not continue to the next solution.

6.3. Reset Linux Terminal Application

  1. Press the Windows I key to open Settings.
  2. In the left pane, click Apps, and then select Apps & features in the right pane. 这就是修复 Windows 11 的 WSL 错误的方法
  3. Find a Linux distribution application, such as Ubuntu, then click on the three dots and select Advanced Options. 这就是修复 Windows 11 的 WSL 错误的方法
  4. Scroll down the page to find the Reset option and click on it. 这就是修复 Windows 11 的 WSL 错误的方法

WslRegisterDistribution failed with error 0x8007019e may occur due to a corrupted installation of the Linux application. You can repair or reset the Linux distribution application to resolve the issue.

8. Fix Unable to access WSL files from Windows

  1. Press the Windows I key to open Settings.
  2. Next, select Windows Update and click Advanced options. 这就是修复 Windows 11 的 WSL 错误的方法
  3. Now, enable Receive updates for other Microsoft products when you update Windows. 这就是修复 Windows 11 的 WSL 错误的方法

When the 9P protocol file server fails to start, you will not be able to access the Windows Subsystem for Linux \\wsl$ on Windows.

The easiest way to fix this error is to enable updates for Microsoft products on Windows Update.

9. Fix the referenced assembly that cannot be found

  1. Press the Windows key and type Turn Windows features on or off, then clickEnter. 这就是修复 Windows 11 的 WSL 错误的方法
  2. Find and enable Windows Subsystem for Linux in the window that appears.

10. Bash hangs

If Bash hangs or refuses to respond to input, restart the system. You can also report memory dumps.

Be sure to save your work before dumping memory as this can cause the system to crash.

What causes WSL errors?

WslRegisterDistribution failed Error code 0x800700032 occurs when the virtual machine platform is disabled.

WslRegisterDistribution failed error code 0x80370102 is a new error and is not limited to Linux distributions. You may also encounter this error when trying to install a Debian distribution.

Also, this error occurs when you want to run a Windows Insider Preview build, and you may see defects or bugs as it is under development.

Upgrading WSL and disabling virtualization may also cause this error. The WslRegisterDistributionFailed 0x8007023e error is caused by issues with WSL or virtual machine setup in Windows.

Errors may occur due to a faulty or incomplete WSL installation, as well as problems with Windows or WSL setup.

While there are many WSL-related issues on Windows 11, fixing them is often as simple as reinstalling WSL or making sure you have the appropriate features activated.

Before delving into any complicated methods, make sure both hardware virtualization and the virtual machine platform are enabled on your PC.

The above is the detailed content of This is how to fix WSL error on Windows 11. For more information, please follow other related articles on the PHP Chinese website!

source:yundongfang.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template