Thorsten Lorenz
Thorsten Lorenz

Reputation: 11847

How can I resolve zlib-enum, zlib-binding, zlib-conduit conflict when installing Yesod

I am trying to install my Yesod web app on another machine.

I have it installed fine on my current machine and can cabal install it on there without any problems.

I seem to run into trouble with it on the other machine though (which is a fresh Ubuntu VM - e.g., no cabal packages where installed on it prior.

Note that I changed nothing about my setup (e.g. cabal files are exactly the same).

This is the error I keep getting:

cabal: cannot configure zlib-enum-0.2.2. It requires zlib-bindings ==0.1.*
For the dependency on zlib-bindings ==0.1.* there are these packages:
zlib-bindings-0.1.0 and zlib-bindings-0.1.0.1. However none of them are available.
zlib-bindings-0.1.0 was excluded because zlib-conduit-0.2.0.1 requires zlib-bindings >=0.0.3 && <0.1
zlib-bindings-0.1.0 was excluded because zlib-bindings-0.0.3.2 was selected instead
zlib-bindings-0.1.0 was excluded because of the top level dependency zlib-bindings ==0.0.3.2
zlib-bindings-0.1.0.1 was excluded because zlib-conduit-0.2.0.1 requires zlib-bindings >=0.0.3 && <0.1
zlib-bindings-0.1.0.1 was excluded because zlib-bindings-0.0.3.2 was selected instead
zlib-bindings-0.1.0.1 was excluded because of the top level dependency zlib-bindings ==0.0.3.2

I have tried all kind of ways to resolve this, but keep running into this same problem, no matter what path I take.

My guess is, that theses packages' versions are conflicting at this point.

How can I resolve this until it gets fixed?

Upvotes: 3

Views: 320

Answers (2)

ehird
ehird

Reputation: 40787

You might want to try installing the new Yesod Platform (Hackage page):

cabal install yesod-platform

It's a metapackage that depends on specific versions of Yesod and all its dependencies, designed to avoid versioning conflicts like this.

You could also try the in-development version of cabal-install, which has the modular dependency solver Michael mentioned. If you darcs get --lazy http://darcs.haskell.org/cabal/, you should be able to run bootstrap.sh in cabal/cabal-install to install it (but you should probably wipe ~/.cabal and ~/.ghc first).1 You still have to explicitly request the modular solver by passing --solver=modular to cabal, though.

Note that, even though it's a development version, it's actually pretty stable; lots of people on GHC 7.4.1 (including me) use it, since the version on Hackage doesn't compile. I haven't had any issues so far.

1 This is for Linux; I think the relevant directory is ~/Library/Haskell on OS X. I have no idea what to do on Windows, especially since the shell script won't run there.

Upvotes: 3

Michael Snoyman
Michael Snoyman

Reputation: 31305

This is a prime example of cabal dependency hell. Theoretically, the fault lies with zlib-enum, since it should have had a major version bump to reflect the major version bump with zlib-bindings. But really, the problem is cabal's dependency analyzer. The new one will hopefully be ready soon.

In the meanwhile, depending on zlib-enum <= 0.2.1 should work.

Also, @ehird's answer should be helpful too, though it may not entirely solve the problem.

Upvotes: 3

Related Questions