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

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

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

小结

在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

### 解决 WSL 安装 Ubuntu 时遇到的错误代码 0x80370114 当尝试通过 Windows Subsystem for Linux (WSL) 安装 Ubuntu 遇到错误代码 `0x80370114`,这通常意味着存在网络连接问题或配置不兼容的情况。以下是详细的解决方案: #### 检查并更新 WSL 版本 确保已安装最新版本的 WSL 可以减少许多潜在的问题。可以通过管理员权限打开 PowerShell 并执行以下命令来完成此操作: ```powershell wsl --update ``` 如果上述命令返回错误,则可能需要手动下载最新的 WSL 更新包[^2]。 #### 启用必要的 Windows 功能 某些情况下,未启用必需的功能也可能引发此类错误。可以再次确认是否启用了虚拟机平台以及适用于 LinuxWindows 子系统功能: ```powershell dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart ``` 重启计算机使更改生效[^4]。 #### 清理旧版 WSL 数据 有时残留的数据会干扰新系统的正常工作。建议先清理现有的 WSL 实例再重新安装: ```powershell wsl --shutdown wsl --unregister <DistributionName> ``` 其中 `<DistributionName>` 是要移除的具体发行版名称,比如 "Ubuntu"[^1]。 #### 调整防火墙设置与代理服务器 考虑到该错误涉及到了网络请求失败的可能性,调整本地防火墙策略或是关闭任何正在使用的 HTTP(S) 代理可能会有所帮助。特别是对于企业环境中设置了严格访问控制的情况下更为重要[^3]。 #### 尝试离线模式下的 Web 下载选项 如果持续遭遇网络超时等问题,考虑采用官方提供的离线 ISO 文件来进行安装也是一个不错的选择。可以从微软商店获取对应的 AppXBundle 或者直接从 GitHub 上找到所需的资源文件。 ---
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值