包管理器Chocolatey官网地址
以管理员权限打开cmd.exe命令行提示,执行如下内容:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
遇到的问题、
ERROR: The remote file either doesn’t exist, is unauthorized, or is forbidden for url ‘https://github.com/denoland/deno/releases/download/v1.15.3/deno-x86_64-pc-windows-msvc.zip’. Exception calling “GetResponse” with “0” argument(s): “Unable to connect to the remote server”
This package is likely not broken for licensed users - see https://docs.chocolatey.org/en-us/features/private-cdn.
The install of deno was NOT successful.
Error while running ‘C:\ProgramData\chocolatey\lib\deno\tools\chocolateyinstall.ps1’.
1.增加等待时间
choco install deno --execution-timeout 10000
2.关闭防火墙
我使用的是第一次方法
最后成功了