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

折月煮酒 提交于 2019-12-19 12:52:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!