【问题标题】:Cabal install http-conduit-browserCabal 安装 http-conduit-browser
【发布时间】:2014-12-13 11:28:22
【问题描述】:

这可能是一场斗争,因为我在 Windows 上......我最近尝试使用 Git Bash 摆脱阴谋集团:

$ rm -R ~/AppData/Roaming/ghc ~/AppData/Roaming/cabal
$ cabal update
$ cabal install cabal-install
$ cabal install http-conduit-browser

结果:

Failed to install http-conduit-1.9.6
Last 10 lines of the build log ( C:\Users\T\AppData\Roaming\cabal\logs\http-conduit-1.9.6.log ):
        so you can specify the instance context yourself
    When deriving the instance for (Read Cookie)

Network\HTTP\Conduit\Types.hs:239:19:
    No instance for (Show UTCTime)
      arising from the third field of `Cookie' (type `UTCTime')
    Possible fix:
      use a standalone 'deriving instance' declaration,
        so you can specify the instance context yourself
    When deriving the instance for (Show Cookie)
cabal.exe: Error: some packages failed to install:
http-conduit-1.9.6 failed during the building phase. The exception was:
ExitFailure 1
http-conduit-browser-1.9.0.2 depends on http-conduit-1.9.6 which failed to
install.

尝试只安装http-conduit 工作正常,但我似乎根本无法安装http-conduit-browser。如果这不起作用,还有其他图书馆吗?我也尝试过shpider,但由于curl 库,它不起作用。

【问题讨论】:

  • 你能把整个日志贴出来C:\Users\T\AppData\Roaming\cabal\logs\http-conduit-1.9.6.log吗?
  • 我从下面的答案中得到了建议,并改用了 Wreq。我会发布日志,但我已经摧毁了我的阴谋集团。如果其他人遇到同样的问题,Wreq 很容易设置和使用。

标签: haskell cabal http-conduit


【解决方案1】:

http-conduit-browser (link) 的 github 页面建议您改用 wreq (link)

如果你想使用 http-conduit-browser,下面是构建 http-conduit-1.9.6 的技巧:

  1. cabal 获取 http-conduit-1.9.6
  2. cd http-conduit-1.9.6
  3. 根据这个 SO 答案修改 Network/HTTP/Conduit/Types.hs:(link) [replace import Data.Time.Clock with import Data.Time]
  4. 阴谋安装

现在您应该能够构建 http-conduit-browser。

【讨论】:

    猜你喜欢
    • 2012-03-03
    • 1970-01-01
    • 2015-01-22
    • 1970-01-01
    • 2015-01-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多