“install-package -name docker”在Windows Server 2016标准上失败 [英] "install-package -name docker" fails on windows server 2016 standard
问题描述
更新: Cross已发布到github存储库。 https://github.com/OneGet/MicrosoftDockerProvider/issues/26
UPDATE: Cross posted to github repository. https://github.com/OneGet/MicrosoftDockerProvider/issues/26
按照此处的说明操作:https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-server我有多个vms不能安装docker包。
Following the directions from here: https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-server I have multiple vms that cannot install the docker package.
当我运行命令安装包时,我期望命令成功完成,但它会抛出错误:
When I run the command install package, I expect the command to complete successfully, but instead it throws an error:
安装包:术语'Get-WindowsFeature'不被识别为cmdlet,函数,脚本文件或
可运行程序的名称。检查名称的拼写,或者如果包含路径,请验证路径是否正确并再次尝试
。
Install-Package : The term 'Get-WindowsFeature' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
以下示例:
Example Below:
PS C:\> Install-Package -Name docker -ProviderName DockerMsftProvider -verbose
PS C:\> Install-Package -Name docker -ProviderName DockerMsftProvider -verbose
VERBOSE:使用提供程序'DockerMsftProvider'搜索包。
VERBOSE:下载大小:0MB
VERBOSE:驱动器上的可用空间:94081.73MB
VERBOSE:正在下载https://dockermsft.blob.core.windows .net / dockercontainer / DockerMsftIndex.json到
C:\ Users \ ADMINI~1 \ AppData \ Local \Temp \\\\DockerMsftProvider \DockerDefault_DockerSearchIndex.json >
VERBOSE:即将下载
VERBOSE:已完成下载
VERBOSE:在0小时0分1秒内下载。
VERBOSE:执行操作"安装包"目标"套餐"Docker'版本'17 .03.0-ee'来自
'DockerDefault'。"。$
包裹(s)来自未标记为受信任的包源。
您确定要从"DockerDefault"安装软件吗?
[Y]是[n]是全部是[N]否 [L]全部否定 [S]暂停 [?]帮助(默认为"N"):a
Install-Package:术语"Get-WindowsFeature"未被识别为cmdlet,函数,脚本文件或
可运行程序的名称。检查名称的拼写,或者如果包含路径,请验证路径是否正确并再次尝试
。
行:1字符:1
+ Install-Package -Name docker -ProviderName DockerMsftProvider -verbos ...
$
+ ~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <无线电通信/>
&NBSP; + CategoryInfo &NBSP; &NBSP; &NBSP; :InvalidOperation :( Microsoft.Power .... InstallPackage:InstallPackage)[Install-Package],
例外情况
&NBSP; + FullyQualifiedErrorId:FailedToDownload,Install-Package,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallP
ackage
VERBOSE: Using the provider 'DockerMsftProvider' for searching packages.
VERBOSE: Download size: 0MB
VERBOSE: Free space on the drive: 94081.73MB
VERBOSE: Downloading https://dockermsft.blob.core.windows.net/dockercontainer/DockerMsftIndex.json to
C:\Users\ADMINI~1\AppData\Local\Temp\1\DockerMsftProvider\DockerDefault_DockerSearchIndex.json
VERBOSE: About to download
VERBOSE: Finished downloading
VERBOSE: Downloaded in 0 hours, 0 minutes, 1 seconds.
VERBOSE: Performing the operation "Install Package" on target "Package 'Docker' version '17.03.0-ee' from
'DockerDefault'.".
The package(s) come(s) from a package source that is not marked as trusted.
Are you sure you want to install software from 'DockerDefault'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): a
Install-Package : The term 'Get-WindowsFeature' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ Install-Package -Name docker -ProviderName DockerMsftProvider -verbos ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
Exception
+ FullyQualifiedErrorId : FailedToDownload,Install-Package,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallP
ackage
推荐答案
我知道这听起来很愚蠢但似乎就像你没有在一个没有升级的会话中运行..可能是吗?
I know it sounds stupid but seems like you're not running in a not elevated session.. could it be?
这篇关于“install-package -name docker”在Windows Server 2016标准上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!