[Haskell-beginners] Problems with the Network package

Daniel Fischer daniel.is.fischer at googlemail.com
Wed Jun 1 13:03:58 CEST 2011


On Wednesday 01 June 2011 12:34:20, Raphael Päbst wrote:
> Good question. Ghc-pkg list gives me Cabal-1.8.0.6 and 1.10..1.0.

Run

cabal --version

in the command shell, that tells you which version of cabal you have and 
with which version of Cabal it was compiled.
(However, if the failure while trying to install network-2.3.0.2 was not an 
ambiguous occurrence of closeFdWith, it's not the issue I suspect, and the 
versions are less important [for the moment, at least].)

Anyway, it would be helpful if you ran the cabal install command with 
higher verbosity - not sure if -v is enough, -v2 should be - and post the 
output (to the list, or paste it on hpaste.org or similar and post a link 
to it here).

> Ghc-pkg check tells me that cabal-1.8.0.6 is broken though because of
> some dependency on Process 1.0.1.5.

Uh oh, have you more than one process package?
That's bad, because process is one of the core libs, having several of 
those lands you in dependency hell. Hope that there's only one version of 
it in the global package-db and unregister those in the user-db.

ghc-pkg unregister --user process

(perhaps with the exact version if there are several).
That will probably complain that unregistering process-a.b.c.d will break 
some packages, unregister those too [or, if there are too many, delete the 
whole user-db] until ghc-pkg check doesn't report broken packages anymore, 
then start reinstalling, but watch that cabal doesn't try to reinstall a 
package already registered with ghc; you can check for that with

cabal install foo bar baz quux --dry-run

> It's all a bit of a mystery to me.
> 
> On 6/1/11, Daniel Fischer <daniel.is.fischer at googlemail.com> wrote:
> > On Wednesday 01 June 2011 11:51:02, Raphael Päbst wrote:
> >> Thanks for the help. As for packages, Yesod for example fails to
> >> install because it is trying to install network 2.3.0.2

Try

cabal install --constraint='network==2.3.0.3' yesod

?

> > 
> > cabal-0.8.* using version 1.8.0.2 of tha Cabal library?



More information about the Beginners mailing list