I'm trying to install aeson
after resetting ~/.ghc
and ~/.cabal
.
cabal install aeson
gives me the following error message:
Resolving dependencies...
cabal: Could not resolve dependencies:
next goal: aeson (user goal)
rejecting: aeson-0.9.0.1, 0.9.0.0, 0.8.1.1, 0.8.1.0 (global constraint
requires ==0.8.0.2)
trying: aeson-0.8.0.2
next goal: bytestring (user goal)
rejecting: bytestring-0.10.6.0, 0.10.4.1, 0.10.4.0, 0.10.2.0 (global
constraint requires installed instance)
rejecting: bytestring-0.10.0.2/installed-4f9... (conflict: aeson =>
bytestring>=0.10.4.0)
rejecting: bytestring-0.10.0.2, 0.10.0.1, 0.10.0.0, 0.9.2.1, 0.9.2.0,
0.9.1.10, 0.9.1.9, 0.9.1.8, 0.9.1.7, 0.9.1.6, 0.9.1.5, 0.9.1.4, 0.9.1.3,
0.9.1.2, 0.9.1.1, 0.9.1.0, 0.9.0.4, 0.9.0.3, 0.9.0.2, 0.9.0.1, 0.9 (global
constraint requires installed instance)
Dependency tree exhaustively searched.
The current version of bytestring
package in my system is 0.10.2.0
. I tried cabal install bytestring --reinstall
so that I can have a more recent version of bytestring (thereby solving aeson dependency issue). But that returns a very odd error:
Resolving dependencies...
cabal: Could not resolve dependencies:
next goal: bytestring (user goal)
rejecting: bytestring-0.10.6.0, 0.10.4.1, 0.10.4.0, 0.10.2.0, 0.10.0.2,
0.10.0.1, 0.10.0.0, 0.9.2.1, 0.9.2.0, 0.9.1.10, 0.9.1.9, 0.9.1.8, 0.9.1.7,
0.9.1.6, 0.9.1.5, 0.9.1.4, 0.9.1.3, 0.9.1.2, 0.9.1.1, 0.9.1.0, 0.9.0.4,
0.9.0.3, 0.9.0.2, 0.9.0.1, 0.9 (global constraint requires installed instance)
Dependency tree exhaustively searched.
I can solve the problem by using sandboxes. But I'm interested to know if there is a nicer method resolve the dependency issue.
Update: Following a suggestion, I removed bytestring
by ghc-pkg unregister --force bytestring
, which broke some packages and am still not able to install aeson.
Following is the output of ghc-pkg list
lists: http://lpaste.net/135108.
Where is your constraint (
global constraint requires ==0.8.0.2
) coming from?