windows下有个脚本运行框,powershell,已管理员的身份运行,然后执行如下
第一步
Get-ExecutionPolicy
如果返回Restricted,则执行这一步
Set-ExecutionPolicy Bypass -Scope Process
第二步
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'))
至此应该安装完成了,可以通过下面的方式查看
choco --version