0

I followed the instructions on lecture one - part 3 and I was trying to start week 1 project. When I run cabal build got the following error:

[nix-shell:~/plutus-pioneer-program/code/week01]$ sudo cabal build

Warning: The build command is a part of the legacy v1 style of cabal usage.

Please switch to using either the new project style and the new-build command
or the legacy v1-build alias as new-style projects will become the default in
the next version of cabal-install. Please file a bug if you cannot replicate a
working v1- use case with the new-style commands.

For more information, see: https://wiki.haskell.org/Cabal/NewBuild

Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
[__0] trying: plutus-pioneer-program-week01-0.1.0.0 (user goal)
[__1] next goal: base (dependency of plutus-pioneer-program-week01)
[__1] rejecting: base-4.12.0.0/installed-4.1... (conflict:
plutus-pioneer-program-week01 => base^>=4.14.1.0)
[__1] fail (backjumping, conflict set: base, plutus-pioneer-program-week01)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: plutus-pioneer-program-week01, base
Trying configure anyway.
Configuring plutus-pioneer-program-week01-0.1.0.0...
cabal: Encountered missing dependencies:
aeson -any,
base >=4.14.1.0 && <4.15,
data-default -any,
playground-common -any,
plutus-contract -any,
plutus-ledger -any,
plutus-ledger-constraints -any,
plutus-tx -any,
plutus-tx-plugin -any

Could not resolve dependencies and cabal: Encountered missing dependencies is the errors here as far I can understand. I tried again by running cabal update and then cabal build but again I get the same error(s) that I described above. Any ideas? What am I doing wrong?

3 Answers 3

1

try "cabal update" before "cabal build".

1
1

Why are you using sudo? Try without. And update of course.

1
  • If I don't I get an access denied error. I tried with update and it does not work. Jan 14, 2022 at 4:56
1

Check and make sure that your version of the repo has the correct commit-id.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.