【发布时间】:2021-09-07 01:23:09
【问题描述】:
我正在尝试在 Windows Server 2019(标准版,版本 1809,内部版本 17763)上安装 WinGet,但无法正常工作...
当尝试来自this blog post 的“直接安装”链接时,我得到以下链接ms-appinstaller:?source=https://aka.ms/getwinget,因为我没有应用安装程序,所以我的浏览器无法理解该链接。
所以我从同一篇博文中提到的 GitHub 发布页面下载了Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle(应该包含 App Installer 和 WinGet)。因为我的系统没有获取 .appxbundle 文件,所以我尝试使用 Powershell 安装它:
Add-AppxPackage ".\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle"
但它抱怨它错过了Microsoft.VCLibs.140.00.UWPDesktop:
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates,
dependency or conflict validation.
Windows cannot install package Microsoft.DesktopAppInstaller_1.11.11451.0_x64__8wekyb3d8bbwe
because this package depends on a framework that could not be found. Provide the framework
"Microsoft.VCLibs.140.00.UWPDesktop" published by "CN=Microsoft Corporation, O=Microsoft
Corporation, L=Redmond, S=Washington, C=US", with neutral or x64 processor architecture and
minimum version 14.0.29231.0, along with this package to install. The frameworks with name
"Microsoft.VCLibs.140.00.UWPDesktop" currently installed
显然,这是一个"C++ Runtime framework packages for Desktop Bridge",也可以作为appx下载;首先安装它,然后安装 DesktopAppInstaller/WinGet 包没有错误:
Add-AppxPackage ".\Microsoft.VCLibs.x64.14.00.Desktop.appx"
Add-AppxPackage ".\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle"
但是,此时我似乎有应用安装程序(因为它现在可以识别 .appx/.appxbundle 文件),但没有 WinGet 客户端,因为当我从命令提示符运行它时,它会告诉我:
'winget' is not recognized as an internal or external command, operable program or batch file.
如何让 WinGet 在 Windows Server 2019 机器上运行?
【问题讨论】:
-
对于其他有同样问题的人,我偶然发现了这个帖子:github.com/microsoft/winget-cli/issues/144
标签: windows-server-2019 winget