繁体   English   中英

无法在 Windows 上更新 ghc

[英]Can't update ghc on Windows

尝试使用 ghc ( ghcup install ghc 9.4.3 ) 更新 ghcup 会导致错误:

[ Warn  ] New cabal version available. To upgrade, run 'ghcup install cabal 3.8.1.0'
[ Info  ] verifying digest of: gs.exe
[ Info  ] downloading: https://downloads.haskell.org/~ghc/9.4.3/ghc-9.4.3-x86_64-unknown-mingw32.tar.xz as file C:\ghcup\tmp\ghcup-ad812d90b7e92bc1\ghc-9.4.3-x86_64-unknown-mingw32.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - Функция отзыва не смогла произвести проверку отзыва для сертификата.
[ Error ] Download failed: Process "curl" with arguments ["-fL", "-o",
[ ...   ]                                                 "C:\\ghcup\\tmp\\ghcup-ad812d90b7e92bc1\\ghc-9.4.3-x86_64-unknown-mingw32.tar.xz.tmp",
[ ...   ]                                                 "https://downloads.haskell.org/~ghc/9.4.3/ghc-9.4.3-x86_64-unknown-mingw32.tar.xz"] failed with exit code 35.
[ Error ] Also check the logs in C:\ghcup\logs

这是日志说的:

Debug: Identified Platform as: Windows
Debug: last access was 9.7176814s ago, cache interval is 300s
Debug: Decoding yaml at: C:\ghcup\cache\ghcup-0.0.7.yaml
Warn: New cabal version available. To upgrade, run 'ghcup install cabal 3.8.1.0'
Info: verifying digest of: gs.exe
Debug: Requested to install GHC with 9.4.3
Info: downloading: https://downloads.haskell.org/~ghc/9.4.3/ghc-9.4.3-x86_64-unknown-mingw32.tar.xz as file C:\ghcup\tmp\ghcup-ad812d90b7e92bc1\ghc-9.4.3-x86_64-unknown-mingw32.tar.xz
Error: Download failed: Process "curl" with arguments ["-fL", "-o",
                                                "C:\\ghcup\\tmp\\ghcup-ad812d90b7e92bc1\\ghc-9.4.3-x86_64-unknown-mingw32.tar.xz.tmp",
                                                "https://downloads.haskell.org/~ghc/9.4.3/ghc-9.4.3-x86_64-unknown-mingw32.tar.xz"] failed with exit code 35.
Error: Also check the logs in C:\ghcup\logs

我尝试使用 curl 命令,他们说会导致 powershell (curl.exe -fL -o "C:\ghcup\tmp\ghcup-3da46c8d7d5a204f\ghc-9.2.5-x86_64-unknown-mingw32.tar.xz. tmp" "https://downloads.haskell.org/~ghc/9.2.5/ghc-9.2.5-x86_64-unknown-mingw32.tar.xz") 它还会引发错误:"curl: (35) schannel : 接下来 InitializeSecurityContext 失败: 未知错误 (0x80092012) -"

您可以通过GHCUP_CURL_OPTS环境变量将选项传递给 Curl。

根据谷歌翻译,错误代码后的俄语“子错误”消息为“吊销 function 无法对证书执行吊销检查”。 因此,传递更安全--ssl-revoke-best-effort或失败的--ssl-no-revoke标志可能就足够了,它只会关闭撤销检查,而不是-k标志这允许完全不安全的连接。

简而言之,在 PowerShell 中,您可能会发现运行它就足够了:

$Env:GHCUP_CURL_OPTS = '--ssl-revoke-best-effort'

在运行ghcup之前。

不过,吊销检查失败有点令人担忧。 如果您尝试通过 web 浏览器访问https://downloads.haskell.org ,您会遇到类似的错误吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM