Installing this may take a few minutes wslregisterdistribution failed with error 0x8007019e

Подсистема Linux для Windows 10 может выдавать ошибку WSLregisterdistribution failed with error 0x8007019e, 0x800706be или 0x8000000d в терминале, после

Подсистема Linux для Windows 10 может выдавать ошибку WSLregisterdistribution failed with error 0x8007019e, 0x800706be или 0x8000000d в терминале, после нажатия любой клавиши, терминал закрывается. Ошибка обычно возникает из-за отключенной функции подсистемы Linux в Windows 10. Также, этот компонент может быть поврежденным, и переустановка может исправить данную ошибку. Разберем, как исправить ошибку WSLregisterdistribution failed with error: 0x8007019e, 0x800706be, 0x8000000d.

WSLregisterdistribution failed with error

1. Проверка подсистемы Linux

Откройте удаление программ через панель управление и нажмите слева «Включение или отключение компонентов Windows«. Найдите компонент «Подсистема Windows для Linux» и установите галочку, чтобы установить этот компонент и перезагрузите ПК.

Если он был уже установлен, то снимите галочку, нажмите применить, и перезагрузите ПК. После загрузки, включите обратно и снова перезагрузите.

подсистема линукс для Windows в компонентах

2. Перезапуск службы LxssManager

Служба диспетчера экземпляра Linux может зависнуть и не работать корректно. Перезапуск данной службы может помочь исправить ошибку WSLregisterdistribution failed with error. Нажмите Win+R и введите services.msc,чтобы открыть службы. В службах найдите LxssManager, кликните по ней правой кнопкой мыши и выберите «Перезапустить«.

Перезапустить службу LxssManager

3. Обновить терминал Linux при помощи CMD

Если используете старую версию дистрибутива, то обновление приложения может решить ошибку «WSLregisterdistribution failed with error 0x8007019e или 0x8000000d«. Для этого запустите командную строку от имени администратора и введите ниже команды по очереди:

  1. C:> bash
  2. $ sudo apt-get update
  3. $ sudo apt-get dist-upgrade
  4. $ <CTRL-D>
  5. C:> exit

Если выше команды не помогли, то обновим сам WSL, введите в CMD:

  • wsl.exe --update
  • Если обновления установились, то нужно перезапустить WSL, введите ниже.
  • wsl --shutdown

wsl.exe --update

4. Переустановка приложения

Перейдите в «Приложения», выберите приложения Linux, которое выдает ошибку (Ubuntu, Kali и т.п.) и сбросьте его по умолчанию. Если сброс не помог, то удалите его полностью и установите заново.

сброс ubuntu


Смотрите еще:

  • Как установить подсистему Linux для Windows 10
  • CMD: Недостаточно ресурсов памяти для обработки этой команды
  • Системная ошибка 6118 при вводе net view в CMD Windows 10
  • DISM ошибка 87 в командной строке Windows
  • Отказано в доступе: Системная ошибка 5 в командной строке

[ Telegram | Поддержать ]

Подсистема Linux для Windows 10 может выдавать ошибку WSLregisterdistribution failed with error 0x8007019e, 0x800706be или 0x8000000d в терминале, после нажатия любой клавиши, терминал закрывается. Ошибка обычно возникает из-за отключенной функции подсистемы Linux в Windows 10. Также, этот компонент может быть поврежденным, и переустановка может исправить данную ошибку. Разберем, как исправить ошибку WSLregisterdistribution failed with error: 0x8007019e, 0x800706be, 0x8000000d.

Откройте удаление программ через панель управление и нажмите слева «Включение или отключение компонентов Windows«. Найдите компонент «Подсистема Windows для Linux» и установите галочку, чтобы установить этот компонент и перезагрузите ПК.

Служба диспетчера экземпляра Linux может зависнуть и не работать корректно. Перезапуск данной службы может помочь исправить ошибку WSLregisterdistribution failed with error. Нажмите Win+R и введите services.msc,чтобы открыть службы. В службах найдите LxssManager, кликните по ней правой кнопкой мыши и выберите «Перезапустить«.

Если используете старую версию дистрибутива, то обновление приложения может решить ошибку «WSLregisterdistribution failed with error 0x8007019e или 0x8000000d«. Для этого запустите командную строку от имени администратора и введите ниже команды по очереди:

Перейдите в «Приложения», выберите приложения Linux, которое выдает ошибку (Ubuntu, Kali и т.п.) и сбросьте его по умолчанию. Если сброс не помог, то удалите его полностью и установите заново.

We have covered some common troubleshooting scenarios associated with WSL below, but please consider searching the issues filed in the WSL product repo on GitHub as well.

Error when trying to upgrade: Invalid command line option: wsl —set-version Ubuntu 2

The requested operation could not be completed due to a virtual disk system limitation. Virtual hard disk files must be uncompressed and unencrypted and must not be sparse.

In my case, the LocalState folder for my Ubuntu 18.04 distribution was located at C:Users AppDataLocalPackagesCanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc

Check WSL Docs GitHub thread #4103 where this issue is being tracked for updated information.

The term ‘wsl’ is not recognized as the name of a cmdlet, function, script file, or operable program.

Error: Windows Subsystem for Linux has no installed distributions.

Error: This update only applies to machines with the Windows Subsystem for Linux.

You are still in old version of Windows which doesn’t support WSL 2. See step #2 for version requirements and links to update.

WSL is not enabled. You will need to return to step #1 and ensure that the optional WSL feature is enabled on your machine.

After you enabled WSL, a reboot is required for it to take effect, reboot your machine and try again.

Error: WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel .

  • If the Linux kernel package is missing in the %SystemRoot%system32lxsstools folder, you will encounter this error. Resolve it by installing the Linux kernel update MSI package in step #4 of these installation instructions. You may need to uninstall the MSI from ‘Add or Remove Programs’, and install it again.

Common issues

I’m on Windows 10 version 1903 and I still do not see options for WSL 2

This is likely because your machine has not yet taken the backport for WSL 2. The simplest way to resolve this is by going to Windows Settings and clicking ‘Check for Updates’ to install the latest updates on your system. See the full instructions on taking the backport.

If you hit ‘Check for Updates’ and still do not receive the update you can install KB KB4566116 manually.

Error: 0x1bc when wsl —set-default-version 2

This may happen when ‘Display Language’ or ‘System Locale’ setting is not English.

The actual error for 0x1bc is:

For more information, please refer to issue 5749

Cannot access WSL files from Windows

A 9p protocol file server provides the service on the Linux side to allow Windows to access the Linux file system. If you cannot access WSL using \wsl$ on Windows, it could be because 9P did not start correctly.

To check this, you can check the start up logs using: dmesg |grep 9p , and this will show you any errors. A successful output looks like the following:

Please see this Github thread for further discussion on this issue.

Can’t start WSL 2 distribution and only see ‘WSL 2’ in output

If your display language is not English, then it is possible you are seeing a truncated version of an error text.

To resolve this issue, please visit https://aka.ms/wsl2kernel and install the kernel manually by following the directions on that doc page.

command not found when executing windows .exe in linux

Users can run Windows executables like notepad.exe directly from Linux. Sometimes, you may hit «command not found» like below:

If there are no win32 paths in your $PATH, interop isn’t going to find the .exe. You can verify it by running echo $PATH in Linux. It’s expected that you will see a win32 path (for example, /mnt/c/Windows) in the output. If you can’t see any Windows paths then most likely your PATH is being overwritten by your Linux shell.

Here is a an example that /etc/profile on Debian contributed to the problem:

The correct way on Debian is to remove above lines. You may also append $PATH during the assignment like below, but this lead to some other problems with WSL and VSCode..

For more information, see issue 5296 and issue 5779.

«Error: 0x80370102 The virtual machine could not be started because a required feature is not installed.»

Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.

If your machine is a VM, please enable nested virtualization manually. Launch powershell with admin, and run:

Please follow guidelines from your PC’s manufacturer on how to enable virtualization. In general, this can involve using the system BIOS to ensure that these features are enabled on your CPU. Instructions for this process can vary from machine to machine, please see this article from Bleeping Computer for an example.

Restart your machine after enabling the Virtual Machine Platform optional component.

Make sure that the hypervisor launch is enabled in your boot configuration. You can validate this by running (elevated powershell):

If you see hypervisorlaunchtype Off , then the hypervisor is disabled. To enable it run in an elevated powershell:

Additionally, if you have 3rd party hypervisors installed (Such as VMware or VirtualBox) then please ensure you have these on the latest versions which can support HyperV (VMware 15.5.5+ and VirtualBox 6+) or are turned off.

Learn more about how to Configure Nested Virtualization when running Hyper-V in a Virtual Machine.

WSL has no network connection on my work machine or in an Enterpise environment

Business or Enterprise environments may have Windows Defender Firewall settings configured to block unauthorized network traffic. If local rule merging is set to «No» then WSL networking will not work by default, and your administrator will need to add a firewall rule to allow it.

You can confirm local rule merging’s setting by following these steps:

  1. Open «Windows Defender Firewall with advanced security» (this is different than «Windows Defender Firewall» in the Control Panel)
  2. Right-click on the «Windows Defender Firewall with advanced security on Local Computer» tab
  3. Select «Properties»
  4. Select the «Public Profile» tab on the new Window that opens
  5. Select «Customize» under the «Settings» section
  6. Check in the «Customize Settings for the Public Profile» window that opens to see if «Rule Merging» is set to «No». This will block access to WSL.

You can find instructions on how to change this Firewall setting in Enterprise environment: Set up WSL for your company.

WSL has no network connectivity once connected to a VPN

If after connecting to a VPN on Windows, bash loses network connectivity, try this workaround from within bash. This workaround will allow you to manually override the DNS resolution through /etc/resolv.conf .

  1. Take a note of the DNS server of the VPN from doing ipconfig.exe /all
  2. Make a copy of the existing resolv.conf sudo cp /etc/resolv.conf /etc/resolv.conf.new
  3. Unlink the current resolv.conf sudo unlink /etc/resolv.conf
  4. sudo mv /etc/resolv.conf.new /etc/resolv.conf
  5. Edit /etc/wsl.conf and add this content to the file. (More info on this set up can be found in Advanced settings configuration)
  1. Open /etc/resolv.conf and
    a. Delete the first line from the file which has a comment describing automatic generation
    b. Add the DNS entry from (1) above as the very first entry in the list of DNS servers.
    c. Close the file.

Once you have disconnected the VPN, you will have to revert the changes to /etc/resolv.conf . To do this, do:

  1. cd /etc
  2. sudo mv resolv.conf resolv.conf.new
  3. sudo ln -s ../run/resolvconf/resolv.conf resolv.conf

Starting WSL or installing a distribution returns an error code

Follow these instructions to collect detailed logs and file an issue on our GitHub.

Updating WSL

There are two components of Windows Subsystem for Linux that can require updating.

To update the Windows Subsystem for Linux itself, use the command wsl —update in PowerShell or CMD.

To update the specific Linux distribution user binaries, use the command: apt-get update | apt-get upgrade in the Linux distribution that you are seeking to update.

Apt-get upgrade errors

Some packages use features that we haven’t implemented yet. udev , for example, isn’t supported yet and causes several apt-get upgrade errors.

To fix issues related to udev , follow the following steps:

Write the following to /usr/sbin/policy-rc.d and save your changes.

Add execute permissions to /usr/sbin/policy-rc.d :

Run the following commands:

«Error: 0x80040306» on installation

This has to do with the fact that we do not support legacy console. To turn off legacy console:

  1. Open cmd.exe
  2. Right click title bar -> Properties -> Uncheck Use legacy console
  3. Click OK

«Error: 0x80040154» after Windows update

The Windows Subsystem for Linux feature may be disabled during a Windows update. If this happens the Windows feature must be re-enabled. Instructions for enabling the Windows Subsystem for Linux can be found in the Manual Installation Guide.

Changing the display language

WSL install will try to automatically change the Ubuntu locale to match the locale of your Windows install. If you do not want this behavior you can run this command to change the Ubuntu locale after install completes. You will have to relaunch bash.exe for this change to take effect.

The below example changes to locale to en-US:

Installation issues after Windows system restore

  1. Delete the %windir%System32TasksMicrosoftWindowsWindows Subsystem for Linux folder.
    Note: Do not do this if your optional feature is fully installed and working.
  2. Enable the WSL optional feature (if not already)
  3. Reboot
  4. lxrun /uninstall /full
  5. Install bash

No internet access in WSL

Some users have reported issues with specific firewall applications blocking internet access in WSL. The firewalls reported are:

  1. Kaspersky
  2. AVG
  3. Avast
  4. Symantec Endpoint Protection

In some cases turning off the firewall allows for access. In some cases simply having the firewall installed looks to block access.

If you are using Microsoft Defender Firewall, unchecking «Blocks all incoming connections, including those in the list of allowed apps.» allows for access.

Permission Denied error when using ping

For Windows Anniversary Update, version 1607, administrator privileges in Windows are required to run ping in WSL. To run ping, run Bash on Ubuntu on Windows as an administrator, or run bash.exe from a CMD/PowerShell prompt with administrator privileges.

For later versions of Windows, Build 14926+, administrator privileges are no longer required.

Bash is hung

If while working with bash, you find that bash is hung (or deadlocked) and not responding to inputs, help us diagnose the issue by collecting and reporting a memory dump. Note that these steps will crash your system. Do not do this if you are not comfortable with that or save your work prior to doing this.

To collect a memory dump

Change the memory dump type to «complete memory dump». While changing the dump type, take a note of your current type.

Use the steps to configure crash using keyboard control.

Repro the hang or deadlock.

Crash the system using the key sequence from (2).

The system will crash and collect the memory dump.

Once the system reboots, report the memory.dmp to secure@microsoft.com. The default location of the dump file is %SystemRoot%memory.dmp or C:Windowsmemory.dmp if C: is the system drive. In the email, note that the dump is for the WSL or Bash on Windows team.

Restore the memory dump type to the original setting.

Check your build number

To find your PC’s architecture and Windows build number, open
Settings > System > About

Look for the OS Build and System Type fields.

To find your Windows Server build number, run the following in PowerShell:

Confirm WSL is enabled

You can confirm that the Windows Subsystem for Linux is enabled by running the following in an elevated PowerShell window:

OpenSSH-Server connection issues

Trying to connect your SSH server is failed with the following error: «Connection closed by 127.0.0.1 port 22».

Make sure your OpenSSH Server is running:

Stop the sshd service and start sshd in debug mode:

Check the startup logs and make sure HostKeys are available and you don’t see log messages such as:

If you do see such messages and the keys are missing under /etc/ssh/ , you will have to regenerate the keys or just purge&install openssh-server:

«The referenced assembly could not be found.» when enabling the WSL optional feature

This error is related to being in a bad install state. Please complete the following steps to try and fix this issue:

If you are running the enable WSL feature command from PowerShell, try using the GUI instead by opening the start menu, searching for ‘Turn Windows features on or off’ and then in the list select ‘Windows Subsystem for Linux’ which will install the optional component.

Update your version of Windows by going to Settings, Updates, and clicking ‘Check for Updates’

If both of those fail and you need to access WSL please consider upgrading in place by reinstalling Windows using installation media and selecting ‘Keep Everything’ to ensure your apps and files are preserved. You can find instructions on how to do so at the Reinstall Windows 10 page.

If you’re seeing this error:

To fix this, append the following to the the /etc/wsl.conf file:

Please note that adding this command will include metadata and modify the file permissions on the Windows files seen from WSL. Please see the File System Permissions for more information.

Running Windows commands fails inside a distribution

Some distributions available in Microsoft Store are yet not fully compatible to run Windows commands out of the box. If you get an error -bash: powershell.exe: command not found running powershell.exe /c start . or any other Windows command, you can resolve it following these steps:

  1. In your WSL distribution run echo $PATH .
    If it does not include: /mnt/c/Windows/system32 something is redefining the standard PATH variable.
  2. Check profile settings with cat /etc/profile .
    If it contains assignment of the PATH variable, edit the file to comment out PATH assignment block with a # character.
  3. Check if wsl.conf is present cat /etc/wsl.conf and make sure it does not contain appendWindowsPath=false , otherwise comment it out.
  4. Restart distribution by typing wsl -t followed by distribution name or run wsl —shutdown either in cmd or PowerShell.

Unable to boot after installing WSL 2

We are aware of an issue affecting users where they are unable to boot after installing WSL 2. While we fully diagnose those issue, users have reported that changing the buffer size or installing the right drivers can help address this. Please view this Github issue to see the latest updates on this issue.

WSL 2 errors when ICS is disabled

Internet Connection Sharing (ICS) is a required component of WSL 2. The ICS service is used by the Host Network Service (HNS) to create the underlying virtual network which WSL 2 relies on for NAT, DNS, DHCP, and host connection sharing.

Disabling the ICS service (SharedAccess) or disabling ICS through group policy will prevent the WSL HNS network from being created. This will result in failures when creating a new WSL version 2 image, and the following error when trying to convert a version 1 image to version 2.

Systems that require WSL 2 should leave the ICS service (SharedAccess) in it’s default start state, Manual (Trigger Start), and any policy that disables ICS should be overwritten or removed. While disabling the ICS service will break WSL 2, and we do not recommend disabling ICS, portions of ICS can be disabled using these instructions

Using older versions of Windows and WSL

There are several differences to note if you’re running an older version of Windows and WSL, like the Windows 10 Creators Update (Oct 2017, Build 16299) or Anniversary Update (Aug 2016, Build 14393). We recommend that you update to the latest Windows version, but if that’s not possible, we have outlined some of the differences below.

Interoperability command differences:

  • bash.exe has been replaced with wsl.exe . Linux commands can be run from the Windows Command Prompt or from PowerShell, but for early Windows versions, you may need to use the bash command. For example: C:temp> bash -c «ls -la» . The WSL commands passed into bash -c are forwarded to the WSL process without modification. File paths must be specified in the WSL format and care must be taken to escape relevant characters. For example: C:temp> bash -c «ls -la /proc/cpuinfo» or C:temp> bash -c «ls -la »/mnt/c/Program Files»» .
  • To see what commands are available for a particular distribution, run [distro.exe] /? . For example, with Ubuntu: C:> ubuntu.exe /? .
  • Windows path is included in the WSL $PATH .
  • When calling a Windows tool from a WSL distribution in an earlier version of Windows 10, you will need to specify the directory path. For example, to call the Windows Notepad app from your WSL command line, enter: /mnt/c/Windows/System32/notepad.exe
  • To change the default user to root use this command in PowerShell: C:> lxrun /setdefaultuser root and then run Bash.exe to log in: C:> bash.exe . Reset your password using the distributions password command: $ passwd username and then close the Linux command line: $ exit . From Windows command prompt or Powershell, reset your default user back to your normal Linux user account: C:> lxrun.exe /setdefaultuser username .

Uninstall legacy version of WSL

If you originally installed WSL on a version of Windows 10 prior to Creators update (Oct 2017, Build 16299), we recommend that you migrate any necessary files, data, etc. from the older Linux distribution you installed, to a newer distribution installed via the Microsoft Store. To remove the legacy distribution from your machine, run the following from a Command Line or PowerShell instance: wsl —unregister Legacy . You also have the option to manually remove the older legacy distribution by deleting the %localappdata%lxss folder (and all it’s sub-contents) using Windows File Explorer or with PowerShell: rm -Recurse $env:localappdata/lxss/ .

Источник

03.09.2020

Просмотров: 5313

Во время работы с подсистемой Linux на Windows 10 пользователь может столкнуться с ошибкой WSLregisterdistribution failed with error 0x8007019e или такими кодами, как 0x80370102, 0x800701bc, 0x80070008, 0xc03a001a, 0x8007019e, 0x800706be, 0x8000000d. Нажав на любую кнопку, терминал закрывается самостоятельно. Причиной тому может быть отключенная функция подсистемы Linux. Однако, как показывает анализ форумов, её повреждение также может быть причиной неполадки. Поэтому, чтобы исправить такую проблему, как WSLregisterdistribution failed with error, предлагаем ознакомиться со следующими рекомендациями.

Читайте также: Включаем Linux на Windows 10

Методы исправления ошибки WSLregisterdistribution failed with error

Поскольку ошибка WSLregisterdistribution failed with error с кодом 0xc03a001a или любым другим связана с подсистемой Linux, то в первую очередь для решения неполадки разработчики Майкрософт рекомендуют её перезапустить. Для этого нужно открыть «Панель управления», «Программы и компоненты» и в меню слева выбрать «Включение и отключение компонентов Windows». Появится небольшое окно. Нужно найти «Подсистема Linux для Windows» и снять отметку (если её нет, то нужно поставить). Перезагружаем ПК. Заходим назад в это меню и ставим отметку. Ошибка должна исчезнуть.

Если по каким-то причинам служба диспетчера экземпляра Linux работает не правильно, то на ПК появится ошибка WSLregisterdistribution failed with error. Перезапуск данной службы может помочь исправить неполадку. Для этого нужно нажать «Win+R» и ввести «services.msc». Находим LxssManager. Нажимаем на ней правой кнопкой мыши и выбираем «Перезапустить».

Желательно перезапустить и сам ПК.

Разработчики также при появлении ошибки с кодом 0x80370102, 0x800701bc, 0x80070008 и сообщением WSLregisterdistribution failed with error предлагают обновить терминал Linux. Для этого нужно запустить командную строку с правами Администратора и ввести такие запросы:

C:> bash

$ sudo apt-get update

$ sudo apt-get dist-upgrade

$

C:> exit

Также можно попробовать обновить сам WSL, ввел wsl.exe –update. После того, как обновления будут установлены, нужно перезапустить WSL командой wsl –shutdown.

Если вышеуказанные способы не помогли решить неполадку, то стоит выполнить сброс самого приложения. Для этого стоит открыть «Параметры», «Приложения», найти в списке Ubuntu и кликнуть «Сброс».

В крайнем случае, если ошибка продолжает появляться, стоит загрузить все обновления для Windows или попробовать откатить систему до более раннего состояния.

WSL или Windows Subsystem для Linux для Windows 10 – отличный инструмент для разработчиков. Но иногда при запуске командной строки выдается код ошибки 0x8007019e или 0x8000000d . Хотя ошибка кажется, что она имеет проблемы с установкой WSL, но это может быть ложным срабатыванием. Некоторые пользователи установили WSL, но все еще сталкивались с проблемой. Код ошибки гласит:

Установка может занять несколько минут …
Сбой WslRegisterDistribution: 0x8007019e/0x8000000d
Ошибка: 0x8007019e/0x8000000d Параметр неверен.
Нажмите любую клавишу для продолжения.

Эта ошибка возникает из-за отсутствия поддержки функций Windows 10. Ошибка даже не позволяет использовать командную строку на основе WSL. В этой статье мы рассмотрим, как исправить эту ошибку в Windows 10.

Содержание

  1. Сбой WslRegisterDistribution: 0x8007019e & 0x8000000d
  2. 1] Включите WSL, используя функции Windows.
  3. 2] Использование Windows PowerShell

Сбой WslRegisterDistribution: 0x8007019e & 0x8000000d

Пользователь должен будет включить функцию Подсистема Windows для Linux , чтобы устранить эту проблему. Есть два способа сделать это:

  1. Включите WSL, включив или выключив функции Windows.
  2. Использование Windows PowerShell.

1] Включите WSL, используя функции Windows.

Чтобы включить функцию подсистемы Windows для Linux с помощью диалогового окна «Включить или отключить функции Windows», необходимо выполнить поиск Включить или отключить функции Windows в окне поиска Windows.

В заполненном списке установите флажок для Подсистема Windows для Linux. Выберите ОК.

Он найдет и установит некоторые необходимые системные файлы и попросит перезагрузить компьютер. После перезагрузки компьютера ваш дистрибутив Linux будет работать без проблем.

2] Использование Windows PowerShell

Откройте Windows PowerShell с правами уровня администратора. Выполните следующую команду, чтобы включить подсистему Windows для Linux:

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

Начнется поиск и установка некоторых необходимых системных файлов.

При появлении запроса вам необходимо ввести Y , чтобы перезагрузить компьютер.

Он установит все необходимые системные файлы, и ваш дистрибутив Linux обычно будет работать сейчас.

Я надеюсь, что это руководство помогло вам.

Понравилась статья? Поделить с друзьями:
  • Installing packages with yarntrace error spawn yarn enoent
  • Installing packages error occurred details
  • Installing fnis pcea2 error 9 индекс находился вне границ массива
  • Installing drivers failed samfirm как исправить
  • Installing driver error mediatek driver not detected