gpt4 book ai didi

windows - Stack (Haskell) 在 Windows 中抛出 TlsException

转载 作者:可可西里 更新时间:2023-11-01 12:38:58 24 4
gpt4 key购买 nike

Stack (在 Windows 下)有时会在尝试下载文件时抛出以下异常(例如,在 stack setup 期间或下载构建计划时):

TlsException (HandshakeFailed (Error_Protocol ("certificate has unknown CA",True,UnknownCa))).

如果发生此错误,如何解决?

(这已在 https://github.com/commercialhaskell/stack/issues/234 上讨论并解决,我重新发布问题以使解决方案更可用。)

最佳答案

这是由于在访问各种网站时 stack 没有找到证书。可以通过在 Internet Explorer 中打开正确的网页(自动添加证书),然后重新启动堆栈来修复它。

要找出访问了哪个网页堆栈,请使用详细选项 (-v) 运行堆栈以查看失败前最后一次尝试的下载。例如:

C:\> stack -v setup
... some output ...
2015-09-18 14:19:14.9807056: [debug] Downloading from https://www.haskell.org/ghc/dist/7.10.1/ghc-7.10.1-i386-unknown-mingw32.tar.xz to C:\... @(stack_GXibO6avQtx8ez3M6BHFie:Stack.Setup src/Stack\Setup.hs:845:5)
TlsException (HandshakeFailed (Error_Protocol ("certificate has unknown CA",True,UnknownCa)))

(注意:确切的消息可能会有所不同。因为现在问题已在我的计算机上解决,所以如果不重新安装 Windows,我将无法重现确切的错误。)

所以堆栈正在从 https://www.haskell.org/ 下载, 所以我们需要打开 https://www.haskell.org/在 Internet 浏览器中。之后堆栈应该可以工作(可能您需要重复此步骤以添加不同的证书)。

堆栈似乎访问的其他网页是:https://github.com , https://www.stackage.org .

此解决方案已在 Win 7 32 位和 Stack 0.1.4.0 上得到验证。

关于windows - Stack (Haskell) 在 Windows 中抛出 TlsException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32654493/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com