0

我正在尝试安装 http-conduit-1.9.6(我的 Haskell 应用程序需要该版本),而我的“cabal install http-conduit-1.9.6”给了我以下错误:

构建 http-conduit-1.9.6...
预处理库 http-conduit-1.9.6...
[ 1 of 12] 编译 Network.HTTP.Conduit.Util ( Network/HTTP/Conduit/Util.hs, dist/build /Network/HTTP/Conduit/Util.o )
[ 2 of 12] 编译 Network.HTTP.Conduit.ConnInfo ( Network/HTTP/Conduit/ConnInfo.hs, dist/build/Network/HTTP/Conduit/ConnInfo.o )
[ 3 of 12] 编译 Network.HTTP.Conduit.Types ( Network/HTTP/Conduit/Types.hs, dist/build/Network/HTTP/Conduit/Types.o )

网络/HTTP/Conduit/Types.hs:239:13:

No instance for (Read UTCTime)  
  arising from the 'deriving' clause of a data type declaration  
Possible fix:
  add an instance declaration for (Read UTCTime)
  or use a standalone 'deriving instance' declaration,
       so you can specify the instance context yourself
When deriving the instance for (Read Cookie)

无法安装 http-conduit-1.9.6
cabal:错误:某些软件包无法安装:
http-conduit-1.9.6 在构建阶段失败。例外是:
ExitFailure 1

我的工作平台是 Ubuntu 14.04 和 cabal 1.20 谢谢。

4

1 回答 1

2

要构建 http-conduit-1.9.6(在沙箱中),我必须:

  1. 在 http-conduit.cabal 的 build-depends 中显式添加对 network-uri 的依赖

  2. 在 Network/HTTP/Conduit/Types.hs 中,将 import Data.Time.Clock 替换为 import Data.Time

    (时间包中的这个问题让我走上了正轨:https ://github.com/haskell/time/issues/7 )

让我知道如果那不这样做。

于 2014-11-25T21:16:08.980 回答