Error in cabal-installing hspec
Asked Answered
N

1

6

I'm trying to install hspec, but I'm getting this:

$ cabal install hspec
Resolving dependencies...                                                                                                                                               
cabal: dependencies conflict: ghc-7.2.2 requires containers ==0.4.2.0 however                                                                                           
containers-0.4.2.0 was excluded because ghc-7.2.2 requires containers                                                                                                   
==0.4.1.0                                                  

What does this even mean?

Also, using ghc 7.2.2, cabal 10.2.

Nodab answered 9/2, 2012 at 18:52 Comment(2)
What is the output of ghc-pkg check?Kebab
Warning: haddock-interfaces: /home/clark/.cabal/share/doc/InternalLibrary4-0.2/html/InternalLibrary4.haddock doesn't exist or isn't a file Warning: haddock-html: /home/clark/.cabal/share/doc/InternalLibrary4-0.2/html doesn't exist or isn't a directory Warning: include-dirs: /usr/include/libpng14 doesn't exist or isn't a directory Warning: include-dirs: /usr/include/libpng14 doesn't exist or isn't a directory Warning: include-dirs: /usr/include/libpng14 doesn't exist or isn't a directoryNodab
C
2

It sounds like you somehow broke your GHC install. GHC 7.2.2 comes with containers-0.4.1.0 (the version of which is the same as for GHC 7.2.1). It might be possible to fix it, but if the global package setup is broken then it would probably be easiest to re-install GHC.

What does ghc-pkg list containers say?

If containers-0.4.2.2 is found only in the per-user install (i.e. the /home/clark/.ghc/${arch}-${os}-7.2.2/package.conf.d output), then rm'ing /home/clark/.ghc/ and re-installing all the packages you installed with cabal install will fix it.

Come answered 12/2, 2012 at 3:6 Comment(5)
Output of ghc-pkg list containers => /usr/lib/ghc-7.2.2/package.conf.d containers-0.4.1.0 /home/clark/.ghc/x86_64-linux-7.2.2/package.conf.d containers-0.4.2.0 Nodab
@ClarkGaebel: so you could try "ghc-pkg unregister containers-0.4.2.0" and see if that fixes it.Come
It says it would break a huge number of packages if I did. Should I --force it?Nodab
@ClarkGaebel Yes, then rebuild those packages. You should never upgrade the boot libraries that come with GHC (base, containers, array, bytestring, etc.; Cabal is the only library that comes with GHC that you can safely install a newer version of in parallel).Come
I just did a full install of my system (rm -rf .ghc .cabal), reinstalled everything. Turns our there were two versions of containers installed thanks to a recent hashmap update. Thanks for your help! Have some bounty.Nodab

© 2022 - 2024 — McMap. All rights reserved.