简体   繁体   中英

Can't update ghc on Windows

Trying to update ghcup with ghc ( ghcup install ghc 9.4.3 ) results in an error:

[ 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

This is what logs say:

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

i tried using the curl command they say leads to an error from 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") it also throws an error: "curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) -"

You can pass options to Curl via the GHCUP_CURL_OPTS environment variable.

According to Google Translate, the Russian "sub-error" message after the error code reads "The revocation function was unable to perform a revocation check on the certificate." So, it may be sufficient to pass the somewhat safer --ssl-revoke-best-effort or, failing that, the --ssl-no-revoke flag, which will only shut off the revocation check, rather than the -k flag which allows for completely insecure connections.

In short, in PowerShell, you may find that it's sufficient to run:

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

before running ghcup .

It's a bit of a concern that the revocation check is failing, though. If you try to access https://downloads.haskell.org via a web browser, do you get any similar errrors?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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