我在命令行中输入代码:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
答案 0 :(得分:0)
我也面临着同样的问题。然后,我使用PowerShell进行安装。 使用PowerShell方法->
在管理命令提示符下输入这些代码->
>>powershell
>>Get-ExecutionPolicy
(如果受限制,则设置为Set-ExecutionPolicy AllSigned)
>>Set-ExecutionPolicy AllSigned
>>Get-ExecutionPolicy
>>Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
更多参考,请点击这里 https://chocolatey.org/docs/installation#install-using-powershell-from-cmdexe
以下图像清楚地说明了您必须做的事情...