1.安装chocolatey
以管理员身份运行cmd,安装chocolatey:
@"%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"
此时报错:
解决方案:
直接打开网址:https://chocolatey.org/install.ps1
右键另存为install.ps1文件(相当于下载install.ps1)
以管理员运行cmd,切换到下载的install.ps1所在目录,运行下面代码:
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
输入choco,检查是否安装成功:
2.安装wget
输入:choco install wget,进行安装:
这里老是报错“操作超时”,应该是网速的关系,多安装几次就好了
使用 wget -V 检查是否安装成功:
此时已经安装好了。