[Haskell-beginners] cabal install happstack

Daniel Fischer daniel.is.fischer at googlemail.com
Mon Oct 24 02:11:22 CEST 2011


On Monday 24 October 2011, 01:37:19, Gary Klindt wrote:
> Hey Haskellers,
> 
> I tried to install happstack. Unfortunately I get the following error:
>  > cabal install happstack
> 
> -Resolving dependencies...
> -cabal: cannot configure deepseq-1.1.0.0. It requires containers >=0.2
> && <0.4
> -For the dependency on containers >=0.2 && <0.4 there are these
> packages: -containers-0.2.0.0, containers-0.2.0.1 and
> containers-0.3.0.0. However none of them are available.
> -containers-0.2.0.0 was excluded because containers-0.4.1.0 was selected
> instead
> -containers-0.2.0.1 was excluded because containers-0.4.1.0 was selected
> instead
> -containers-0.3.0.0 was excluded because containers-0.4.1.0 was selected
> instead

Since ghc-6.12.* cam with containers-0.3.0.0, this means you have installed 
a newer version of containers.
That is generally not a good idea.
containers is one of the boot packages, ghc depends on it and thus many of 
the packages you install will depend on the version that came with ghc.

Run

$ ghc-pkg check

to see whether you already have some broken packages.

> 
> I wanted to deselect containers:
>  > ghc-pkg unregister containers-0.4.1.0
> 
> -ghc-pkg: unregistering containers-0.4.1.0 would break the following
> packages: Cabal-1.10.2.0 (use --force to override)

Hm, a bit strange, Cabal's dependencies list only base and filepath on 
hackage, although it also depends on containers, array, directory...
Anyway, your upgraded Cabal was built against containers-0.4.1.0, so it 
will break without that.

> 
> But I did not want to use the force option, because I like cabal, and
> don't want to break it.

Is it Cabal the library or cabal the executable?
If the latter, once it's built, it doesn't need the Cabal version it was 
built with to be present.

> 
> What should I do?

You could try

a) installing happstack with a constraint on the containers version to use,
$ cabal install --constraint="containers < 0.4" happstack
If nothing but Cabal on your system depends on containers-0.4.1.0 yet, that 
would probably work, but that would leave your installation open to 
breakage due to conflicting containers dependencies.

b) installing happstack with a later deepseq,
$ cabal install --constraint="deepseq > 1.1.0.0"

c) unregister Cabal-1.10.2.0, then containers-0.4.1.0, then reinstall 
Cabal-1.10.2 (--dry-run first, to check whether that would want to 
reinstall a new containers) [but you could also decide to use the 
Cabal-1.8.* that came with your ghc].

> 
>  > ghc --version
> 
> -6.12.1
> 
> Greets
> Gary




More information about the Beginners mailing list