Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get cabal to ignore the global package DB when using a sandbox

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?

like image 760
jmite Avatar asked Feb 05 '14 19:02

jmite


1 Answers

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.

like image 195
Vladimir Still Avatar answered Oct 20 '22 21:10

Vladimir Still