srncristea
srncristea

Reputation: 131

cabal sandbox dependencies not found

I have a problem when I work with cabal sandbox, I created a sandbox for a 'hello world' application but when I try to run cabal install --only-dependencies I get the following error:

$ cabal install --only-dependencies
Resolving dependencies... cabal: Could not resolve dependencies:
trying: haskeline-0.7.2.1/installed-dad... (user goal) next goal:
helloworld (user goal) rejecting: helloworld-0.1.0.0 (conflict:
haskeline => base==4.7.0.2/installed-918..., helloworld => base>=4.8
&& <4.9) Dependency tree exhaustively searched.

Note: when using a sandbox, all packages are required to have
consistent dependencies. Try reinstalling/unregistering the offending
packages or recreating the sandbox.

I want to mention that if I try to run on this sandbox cabal repl I get the error.

$ cabal repl
Package has never been configured. Configuring with default flags. If
this fails, please run configure manually. Resolving dependencies...
Configuring helloworld-0.1.0.0... cabal: At least the following
dependencies are missing: base ==4.8.*

If I run cabal repl outside of sandbox everything is working ok.

If any of you have an idea pls share with me :),

thanks sorin

Upvotes: 2

Views: 207

Answers (1)

Michael Snoyman
Michael Snoyman

Reputation: 31305

It looks like your version constraints want you to use GHC 7.10- which bundles base version 4.8- while you're using GHC 7.8 and base 4.7. You could:

  • Modify the cabal file and its base version bounds
  • Switch to a different version of GHC
  • Try building with stack, which will automatically detect those kinds of things during stack init and then offer to install the appropriate GHC for you.

Upvotes: 1

Related Questions