After making cabal install of the darcsden code I get this message:
cabal: The following packages are likely to be broken by the reinstalls:
bin-package-db-0.0.0.0
ghc-7.4.1
Use –force-reinstalls if you want to install anyway.
How do I get around this? What does it mean?
Why does it happen?
If you look at the full output of
cabal install darcsden, you will find several lines that look like this:This means that
cabalhas found an install plan that involves (destructively) reinstalling packages that you already have on your system.Now, GHC packages are rather sensitive when it comes to their (reflexive) dependencies, and generally only work if exactly the right version of all dependencies is available, compiled against the right versions of their dependencies and so on. Therefore, replacing an already installed package with a new version of changed dependencies can cause some packages on your system to become unusable. Since version 0.14.0,
cabalwarns you about such a situation in advance to prevent you from accidentally breaking your system.In your case,
ghcandbin-package-dbare among the potentially broken packages, because they depend onbinarywhich gets reinstalled. So you should not try to use the--force-reinstallsflag, because it might really break your GHC.What can you do?
If you scan what is going to be reinstalled, you see that quite a few dependencies are downgraded. This hints at the fact that the package you are trying to install might not be properly updated to GHC 7.4.1 yet.
You can in general try to call
cabal install darcsden --avoid-reinstallsto explicitly try to find an install plan that has no reinstalls. Unfortunately, in this case, it fails (for me).I’ve briefly looked at the
darcsdenpackage description, but it looks like quite a few dependencies ofdarcsdenneed to be updated. So the remaining options are: Convince the author(s) ofdarcsdento release an updated version, or installdarcsdenusing an older version of GHC (such as 7.0.4), which should just work.