Windows Subsystem for Linux (WSL)安装Ubuntu 0x80070005的问题

本文讲述在Windows 11中安装Windows Subsystem for Linux (WSL)及Ubuntu 22.04.2 LTS时,碰到0x80070005报错的解决办法。问题包括在微软应用商店安装及运行时均报错,通过开启相关功能、修改目录权限、下载安装包等操作解决。

小结

在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

参考优快云: 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
优快云: 安装WSL2时遇到的问题(0x80370102报错)解决
优快云: WindowsApps 权限问题导致Microsoft Store及其下载的应用不能启动(闪退)的解决办法
优快云: 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

评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值