问题
I'm trying to install two libraries, Elm
and yesod-platform
, using a cabal sandbox on Ubuntu. The problem is, I'm using xmonad as my window manager. Thus, a bunch of Haskell libraries have been installed by my package manager. When trying to resolve dependencies, it's using the versions of the libraries installed by apt, and thus is giving a "maximum backjumps exceeded" error.
How can I instruct Cabal to ignore any packages not in the Cabal sandbox, so that it will install fresh versinos of these packages in the sandbox and be able to resolve the dependcies?
回答1:
Too late probably, but still…
I don't know how to do exactly this, but you can try to force cabal to reinstall those packages in sandbox, it will tell you it is dangerous, but as it is in sandbox I believe it not (I can't see how it would break your system/profile packages). But that is kind of impractical solution. And you will have to specify exact version.
来源:https://stackoverflow.com/questions/21587200/how-to-get-cabal-to-ignore-the-global-package-db-when-using-a-sandbox