2
votes

I am trying to run a haskelldb-demo

cabal sandbox init && cabal install --only-dependencies

It needs HDBC-postgresql-2.2.3.1 which needs base package version as base>=3 && <4.5. My system has base pkg versioned 4.7+.

I am using cabal sandbox but cabal install still refers to the base (v4.7.0.2)package from the global repository and rejects all versions of HDBC-postgresql

rejecting: HDBC-postgresql-2.2.3.1 (conflict: base==4.7.0.2/installed-bfd...,
HDBC-postgresql => base>=3 && <4.5)

why does cabal refer to the system level packages, inspite me making a sandbox?

1

1 Answers

3
votes

Cabal always use the global package database. Sandboxing only means you don't use the user package database. Presumably it's to make sure you have the base packages and ghc available.

If you have a mismatch on base that means the package you try to install is not compatible with your version of GHC. I would avoid installing different versions of base.

Related questions (without clear answers):

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

cabal sandbox v. global package db