【问题标题】:How do I install WinGet on Windows Server 2019?如何在 Windows Server 2019 上安装 WinGet?
【发布时间】: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 机器上运行?

【问题讨论】:

标签: windows-server-2019 winget


【解决方案1】:

不支持 Windows Server 2019 和 Windows Server 2022。可以安装 Windows 包管理器,但这些 SKU 中不包含依赖项。

https://github.com/microsoft/winget-cli/issues/754#issuecomment-902798802

【讨论】:

    猜你喜欢
    • 2018-09-18
    • 2021-10-27
    • 1970-01-01
    • 2021-11-17
    • 2021-03-29
    • 2021-07-18
    • 2020-12-16
    • 2023-03-06
    • 2022-10-17
    相关资源
    最近更新 更多