سؤال

I'm using cabal-install 1.14.0 on Ubuntu 12.04, and ghc 7.4.1.

Some cabal packages I try to install are pulling in directory-1.2.0.0, which requires ghc 7.6. Is there a way to configure cabal to not even attempt to install directory-1.2.0.0?

هل كانت مفيدة؟

المحلول

You can use a constraint,

cabal install foo --constraint="directory < 1.2"

or, as Daniel Wagner reminded me, better, since it really prevents reinstalls,

cabal install foo --constraint="directory installed"

and if you want that globally, add that to your cabal config file (~/.cabal/config on Linux and Mac, Somewhere in \Users\You\AppData on Windows, iirc), that has a line

-- constraint:

uncomment that and add the constraint.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top