我想安装 Docker,所以我尝试了下面的命令,它给出了一个错误
PS C:\Windows\system32> Install-Module -Name DockerMsftProvider PackageManagement\Install-Package : 未找到指定搜索条件和模块名称“DockerMsftProvider”的匹配项。尝试 Get-PSRepository 以查看所有可用的已注册模块存储库。在 C:\Program Files\ WindowsPowerShell\ Modules\ PowerShellGet\ 1.0.0.1\ PSModule .psm1:1772 char:21 $null = PackageManagement\Install-Package @PSBoundParameters CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage ) [安装包],异常 + FullyQualifiedErrorId:NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
甚至Install-Module -Name DockerMsftProvider -Repository PSGallery -Force给出了同样的错误。
我尝试了以下资源,但仍然相同。我无法注册 PSRepository。只有安装了这个,我才能在 Windows Server 中安装 Docker。我花了几个小时来解决这个问题,但进度仍为 0%。注册 PSRepository ( Register-PSRepository -Default -InstallationPolicy Trusted ) 没有任何错误,但仍然不可见。
任何可能的帮助来解决这个问题?
https://copdips.com/2018/05/setting-up-powershell-gallery-and-nuget-gallery-for-powershell.html
https://www.powershellgallery.com/packages/PowerShellGet/2.2.1