代码之家  ›  专栏  ›  技术社区  ›  Brent.Longborough

如何让Cabal绕过我的Windows代理设置?

  •  4
  • Brent.Longborough  · 技术社区  · 15 年前

    用户错误(Codec.Compression.Zlib:

    从谷歌周围的挖掘中,阴谋集团或其图书馆似乎遇到了问题 在这个地区。

    我能看到的可能解决方案有:

    1. 使用阴谋集团时关闭代理(不太喜欢这个);或

    2. 因为我是一个彻头彻尾的哈斯凯尔·努伯,我还不适应DARC;或

    2 回复  |  直到 15 年前
        2
  •  4
  •   Brent.Longborough    15 年前

    export HTTP_PROXY="::"
    

    以下是实验日志的一部分:

    尝试@SamB的解决方案:

    [12:10:35z ~]:export HTTP_PROXY=""
    [12:11:47z ~]:set|grep HTTP
    HTTP_PROXY=
    [12:11:50z ~]:cabal update
    Downloading the latest package list from hackage.haskell.org
    cabal.exe: connect: failed (Connection refused (WSAECONNREFUSED))
    

    [12:11:54z ~]:export HTTP_PROXY="None"
    [12:12:02z ~]:set|grep HTTP
    HTTP_PROXY=None
    [12:12:04z ~]:cabal update
    Downloading the latest package list from hackage.haskell.org
    cabal.exe: user error [\]
               (openTCPConnection: host lookup failure for "None")
    

    尝试“不讲道理的人”的解决方案:

    [12:23:44z ~]:export HTTP_PROXY="::"
    [12:24:00z ~]:set|grep HTTP
    HTTP_PROXY=::
    [12:24:04z ~]:cabal update
    Downloading the latest package list from hackage.haskell.org
    Warning: invalid http proxy uri: "::"
    Warning: proxy uri must be http with a hostname
    Warning: ignoring http proxy, trying a direct connection
    Note: there is a new version of cabal-install available.
    To upgrade, run: cabal install cabal-install
    [12:24:34z ~]:
    

    耶!