微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在 Windows Server 2019 上安装 WinGet?

如何解决如何在 Windows Server 2019 上安装 WinGet?

我正在尝试在 Windows Server 2019(标准版,版本 1809,内部版本 17763)上安装 WinGet,但我无法让它工作......

在尝试来自 this blog post 的“直接安装”链接时,我收到以下链接 ms-appinstaller:?source=https://aka.ms/getwinget,我的浏览器无法识别该链接,因为我没有应用安装程序。

所以我从同一篇博文中提到的 GitHub 发布页面下载了 Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle(应该包含应用安装程序和 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 机器上运行?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。