使用winget安装Casey.Just时遇InternetOpenURL()错误求助
解决Winget安装Casey.Just时出现InternetOpenURL() Failed 0x80072ee2错误
问题场景
我在为Hyperledger Fabric项目使用PowerShell执行以下命令安装Just:
winget install --id Casey.Just --exact
命令执行后显示下载链接:Downloading https://github.com/casey/just/releases/download/1.17.0/just-1.17.0-x86_64-pc-windows-msvc.zip,随后出现错误:
An unexpected error occurred while executing the command: InternetOpenURL() Failed 0x80072ee2 : unknown error
解决方法
1. 排查网络与代理
- 0x80072ee2属于网络超时类错误,先手动尝试打开下载链接,确认当前网络能正常访问对应资源。
- 若系统启用了代理,检查Winget是否适配代理配置:
可临时关闭代理后重新执行安装命令测试。Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' | Select-Object ProxyServer, ProxyEnable
2. 重置Winget缓存
缓存损坏可能导致下载异常:
- 关闭所有PowerShell窗口,执行命令删除缓存目录:
Remove-Item -Path "$env:LOCALAPPDATA\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Cache" -Recurse -Force - 重启PowerShell后重试安装命令。
3. 手动下载安装
跳过Winget直接完成安装:
- 找到对应版本的Just安装包(如
just-1.17.0-x86_64-pc-windows-msvc.zip)并下载。 - 解压后将
just.exe放到系统PATH包含的目录(如C:\Windows\System32)。 - 在新PowerShell窗口验证安装:
just --version
4. 更新Winget版本
旧版Winget可能存在网络兼容性问题:
- 执行命令更新Winget:
winget upgrade --id Microsoft.DesktopAppInstaller - 更新完成后重启PowerShell,重试安装。
内容的提问来源于stack exchange,提问作者Osemu Aimiosior
相关产品推荐
相关产品推荐

