小结
在Windows 11中安装Windows Subsystem for Linux (WSL), 并安装Ubuntu 22.04.2 LTS,碰到了棘手的问题报错:0x80070005, 进行了解决。
问题
在Windows 11的微软应用商店Microsoft Store中安装Ubuntu 22.04.2 LTS,碰到0x80070005的问题,
PS C:\WINDOWS\system32> wsl -l -o
PS C:\WINDOWS\system32> wsl --install -d Ubuntu-22.04
单独下载Ubuntu 22.04.2 LTS的WSL安装文件进行成功安装,安装完成后运行依然有碰到0x80070005的问题。
解决
0x80070005的问题的问题是与权限相关。首先在Windows 11中开启相关功能:Turn Windows features on or off
开启以下三个功能:
- Hyper-V
- Virtual Machine Platform
- Windows Subsystems for Linux
参考CSDN: Win10下WindowsApps权限
修改C:\Program Files\WindowsApps
目录的权限,添加Everyone
用户有完全控制的权限。
在Windows 11的微软应用商店Microsoft Store中安装Ubuntu 22.04.2 LTS实在试了各种办法还是不行,那么只有硬来了,下载Ubuntu 22.04.2 LTS WSL的安装包。使用以下指令进行安装:
PS C:\Users\XYZ\Downloads> Add-AppxPackage .\Ubuntu2204-221101.AppxBundle
安装完成后,运行Ubuntu
还是碰到0x80070005的问题, 参考WslRegisterDistribution failed with error: 0x80070005 #6744
可以把C:\Program Files\WindowsApps
目录下的Ubuntu目录拷贝到其它目录下,例如下载目录:
got the same exact problem!
After entering registry editor, take ownership of the files, installing and reisntalling wsl and the update; what worked for me is to
move the kali linux files of the microsoft store, to somewhere else (like the Downloads folder for example), and then click install.
And worked everything
这样,Ubuntu-22.04
安装成功,检查版本号如下:
john@LAPTOP-XYZ:~$ sudo lsb_release -a
[sudo] password for john: xxx
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
出碰到问题:The system cannot find the path specified.
,参考The system cannot find the path specified. #6333 ,解决如下:
wslconfig /u Ubuntu-22.04
参考
Manual installation steps for older versions of WSL
Install Linux on Windows with WSL
CSDN: 安装WSL2时遇到的问题(0x80370102报错)解决
CSDN: WindowsApps 权限问题导致Microsoft Store及其下载的应用不能启动(闪退)的解决办法
CSDN: Win10下WindowsApps权限
WSL安装Linux报错WslRegisterDistribution failed with error: 0x80370102
Is there a way of installing Ubuntu (Windows Subsystem for Linux) on Win10 (v1709) without using the Store?
Windows 10 1903 WSL – Access is Denied (Error 0x80070005)
Group Policy – Use a Custom Security Template in a Group Policy to Globally Manage the LxssManager Service
暴力解决Win10 UWP应用问题
The system cannot find the path specified. #6333
WslRegisterDistribution failed with error: 0x80070005 #6744