在Windows 7 64位上安装Chocolatey时出错

问题描述

我正在尝试在Windows 7 64位上安装Chocolatey。正在使用文档Here 当我在命令提示符下键入以下代码时。

PowerShell 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'))

它会引发错误,如下面的屏幕截图所示

screenshots

我不知道错误的全部原因。我只是在代码运行之前在代码的前面添加 Powershell

解决方法

升级你的powershell版本并尝试在升级我的powershell版本后出现这个错误geon

,

Chocolatey网站需要TLS 1.2才能访问它并从中下载安装脚本。

看看this blog post,它解释了更改,您可以在PowerShell中运行的命令以查看是否受支持以及可以对较旧的旧系统(例如Windows 7)执行的操作。