1

I'm trying to install http-conduit-1.9.6, and running cabal install http-conduit-1.9.6 gives me the following error:

Network/HTTP/Conduit/Request.hs:43:8:
    Could not find module `Network.URI'
    It is a member of the hidden package `network-2.5.0.0'.
    Perhaps you need to add `network' to the build-depends in your .cabal file.
    It is a member of the hidden package `network-2.4.1.2'.
    Perhaps you need to add `network' to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.
Failed to install http-conduit-1.9.6
World file is already up to date.
cabal: Error: some packages failed to install:
http-conduit-1.9.6 failed during the building phase. The exception was:
ExitFailure 1

I have installed network-2.5.0.0 and network-2.4.1.2, the output of ghc-pkg list network is:

/var/lib/ghc/package.conf.d
/root/.ghc/x86_64-linux-7.6.3/package.conf.d
   network-2.4.1.2
   network-2.5.0.0
   network-2.6.0.2

I'm new with Haskell, and I'm now sure if having two repositories could be a problem. My work platform is Ubuntu 14.04, GHC 7.6.3, and cabal 1.20.

bheklilr
  • 53,530
  • 6
  • 107
  • 163
Oscar
  • 11
  • 1
  • Do you have `network==2.5.0.0` in your `.cabal` file? You have the library installed globally, but not for your project, it would seem. – bheklilr Nov 10 '14 at 15:10
  • Are you using a sandbox for this application or are you using globally installed packages? That would also be very important here. – bheklilr Nov 10 '14 at 15:14
  • I'm not using a sandbox – Oscar Nov 10 '14 at 15:34
  • the http-conduit.cabal file has a flag to determine which version of network package is needed. I don't use that flag, so default version used is >=2.3, and I suppose to have 3 different versions (2.4.1.2, 2.5.0.0, 2.6.0.2) to use – Oscar Nov 10 '14 at 16:42
  • If you have 3 versions of network installed, you are deep in cabal hell. Maybe there is a clever solution, but the simplest and quickest one will be to delete your package database and start from scratch (this time, don't install a new version of network - if you really must, do it in a sandbox). – user2407038 Nov 10 '14 at 19:18
  • ¿Is there any easy way to delete all package database? I don't want to break anything... :) – Oscar Nov 11 '14 at 10:47
  • `rm -R ~/.ghc` should do it. You can safely remove that directory and keep the rest of your configuration, download caches, binary utilites etc which live in `~/.cabal`. – Shaun the Sheep Nov 11 '14 at 13:47
  • Thanks, I think I finally solved my dependency problems, but now when I'm compliling the package, I get the following error: Network/HTTP/Conduit/Types.hs:239:13: No instance for (Read UTCTime) arising from the 'deriving' clause of a data type declaration – Oscar Nov 13 '14 at 14:42

0 Answers0