我正在尝试构建并运行Hackage服务器https://github.com/haskell/hackage-server的副本。我按照https://github.com/haskell/hackage-server/wiki中的说明以及自述文件中的说明进行操作。无论我尝试哪个,当尝试使用ghc 7.8.4和cabal 1.22构建时,我收到以下错误:
Preprocessing executable 'hackage-server' for hackage-server-0.5.0...
Main.hs:40:8:
Could not find module ‘Network.URI’
It is a member of the hidden package ‘network-uri-2.6.0.1’.
Perhaps you need to add ‘network-uri’ to the build-depends in your .cabal file.
It is a member of the hidden package ‘network-2.4.2.3’.
Perhaps you need to add ‘network’ to the build-depends in your .cabal file.
我也尝试过使用最新的Haskell平台,我得到了同样的失败信息。
如果这是hackage-server的当前主分支中的错误,或者如果它与我安装ghc或cabal的方式有关,我正在尝试解决。
编辑:我再次尝试使用Ubuntu 14.04 repo haskell-platform(ghc 7.6.3,cabal 1.16)并发生同样的错误。答案 0 :(得分:0)
network-uri
前一段时间是split from network
,但看起来Hackage还没有更新。
要解决此问题,请打开hackage-server.cabal
并将这些行添加到build-dependencies
:
network >= 2.6,
network-uri >= 2.6
那应该让它再次运作。