“Install-Module -Name DockerMsftProvider -Repository PSGallery -Force”
,但失败了。它建议找不到 PSGallery。我执行了 "Get-PSRepository"
。错误信息如下:
我尝试了3种解决方法,但都没有成功。WARNING: 无法找到模块存储库。
我成功地执行了
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Verbose -Force
。我成功地安装了 chocolatey。
我执行了
"powershell Register-PSRepository -Name "PSGallery" –SourceLocation "https://www.powershellgallery.com/api/v2/" -InstallationPolicy Trusted"
,但失败了。它要求我使用"Register-PSRepository -Default"
。
"powershell Register-PSRepository -Default -Name "PSGallery" –SourceLocation "https://www.powershellgallery.com/api/v2/" -InstallationPolicy Trusted"
,但仍然失败。请问我该如何解决这个问题?