I followed the URL here → Installing cardano-node and cardano-cli from source | Cardano Developer Portal
after the command cabal configure --with-compiler=ghc-8.10.7, I got:
Warning: index-state ignored for old-format (remote repository
‘hackage.haskell.org’)
Resolving dependencies…
cabal: Could not resolve dependencies:
[__0] trying: Win32-network-0.1.0.0 (user goal)
[__1] trying: base-4.14.3.0/installed-4.14.3.0 (dependency of Win32-network)
[__2] trying: byron-spec-chain-0.1.0.0 (user goal)
[__3] trying: hedgehog-1.0.5 (dependency of byron-spec-chain)
[__4] next goal: primitive (dependency of hedgehog)
[__4] rejecting: primitive-0.6.4.0 (conflict:
base==4.14.3.0/installed-4.14.3.0, primitive => base>=4.5 && <4.13)
[__4] skipping: primitive-0.6.1.1, primitive-0.6.1.0, primitive-0.5.4.0,
primitive-0.5.3.0, primitive-0.5.2.1, primitive-0.5.1.0, primitive-0.5.0.1,
primitive-0.5, primitive-0.4.1, primitive-0.4.0.1, primitive-0.4,
primitive-0.3.1, primitive-0.3, primitive-0.2.1, primitive-0.2, primitive-0.1,
primitive-0.6.3.0, primitive-0.6.2.0, primitive-0.6.1.2, primitive-0.6 (has
the same characteristics that caused the previous version to fail: excludes
‘base’ version 4.14.3.0)
[__4] fail (backjumping, conflict set: base, hedgehog, primitive)
After searching the rest of the dependency tree exhaustively, these were the
goals I’ve had most trouble fulfilling: base, primitive, hedgehog,
Win32-network, byron-spec-chain
Try running with --minimize-conflict-set to improve the error message.
So module primitive requires base>=4.5 && <4.13. Then I installed ghc v8.6.5 whose base is 4.12.0.0 by ghcup, and tried again, I got:
Warning: index-state ignored for old-format (remote repository
‘hackage.haskell.org’)
Resolving dependencies…
cabal: Could not resolve dependencies:
[__0] trying: Win32-network-0.1.0.0 (user goal)
[__1] trying: base-4.12.0.0/installed-4.12.0.0 (dependency of Win32-network)
[__2] next goal: base-deriving-via (user goal)
[__2] rejecting: base-deriving-via-0.1.0.0 (conflict:
base==4.12.0.0/installed-4.12.0.0, base-deriving-via => base>=4.14)
[__2] fail (backjumping, conflict set: base, base-deriving-via)
After searching the rest of the dependency tree exhaustively, these were the
goals I’ve had most trouble fulfilling: base, base-deriving-via, Win32-network
Again, but this time it is module base-deriving-via to complain with the requirement base>=4.14.
Compared with previous one, the requirement of module primitive and that of module base-deriving-via conflict! Module primitive requires base>=4.5 && <4.13. While module base-deriving-via requires base >=4.14. How can fulfill them both?
Have no idea how to solve, anyone has a chance to encounter this problem?
My Working Environment:
Desktop Ubuntu 20.04 running on a virtual machine.