我自己是網路開發學習的新手。我不是cs學生。我正在以簡單的步驟關注一本名為 HTML5 的書。有一個名為“構建輸入表單”的課程,它使用免費的 Abyss 個人版 Web 服務器和 activeperl 腳本。我想在我的機器上安裝 activeperl。我在 Windows 8.1 上。Activestate 站點不再提供 .exe 檔案,而是為 Windows 10 提供 cli 安裝。站點表示也支持 Windows 8.1。我嘗試為 Windows 安裝他們的 cli 程式命令,它是
powershell -Command "& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://platform.activestate.com/dl/cli/install.ps1')))".
然后我收到了這個錯誤資訊。 [附上截圖] 截圖
然后我用谷歌搜索了例外,發現 powershell 沒有配置為 2019 年之前的舊版本 Windows 以與 tls 1.2 一起使用。
https://github.com/dotnet/docs/issues/6873
有關如何解決此問題的任何提示???
uj5u.com熱心網友回復:
注意:
以下是獲得有效解決下載的的目標
*.ps1檔案成功,但在成功下載腳本時,其他問題可能會浮出水面執行。實際上,由于您使用的是 PowerShell v4,因此腳本執行因依賴v5
Expand-Archivecmdlet而失敗,如本對您后續問題的回答中所述。
;在.DownloadString()呼叫前的 -separated 陳述句中按如下方式啟用 TLS 1.2:
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; & ([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://platform.activestate.com/dl/cli/install.ps1')))"
注意:由于您僅將 PowerShell 實體用于已知使用 TLS 1.2的單個下載,因此上述僅啟用 TLS 1.2 。
如果您還必須保留最初啟用的協議:
PowerShell v5 語法:
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = 'Tls12'; & ([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://platform.activestate.com/dl/cli/install.ps1')))"
PowerShell v4- 語法:
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12; & ([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://platform.activestate.com/dl/cli/install.ps1')))"
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/357872.html
標籤:视窗 电源外壳 tls1.2 活跃的perl 活动状态
上一篇:為什么我的程式快捷方式在新安裝時沒有在Windows開始選單中突出顯示?
下一篇:WinUi3顯示另一個視窗
