1
我試圖在重置~/.ghc
和~/.cabal
後安裝aeson
。可以做些什麼來解決這個依賴性問題?
cabal install aeson
給了我以下錯誤信息:
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.
bytestring
包在我的系統中的最新版本是0.10.2.0
。我試過cabal install bytestring --reinstall
,這樣我就可以擁有更新版本的bytestring(從而解決aeson依賴性問題)。但是,這返回了一個非常奇怪的錯誤:
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.
我可以通過使用沙箱來解決問題。但我很想知道是否有更好的方法來解決依賴性問題。
更新:繼一個建議,我通過ghc-pkg unregister --force bytestring
,這打破了一些包,我仍然無法安裝埃宋刪除bytestring
。
以下是ghc-pkg list
列表的輸出:http://lpaste.net/135108。
'bytestring'是'aeson'的依賴關係。所以刪除'bytestring'並安裝'aeson'本身。 – Sibi
@Sibi,我刪除了bytestring。現在'cabal install aeson'會指向第二個錯誤(與bytestring有關)。有什麼建議麼? – fermesomme
試試'cabal install --reinstall --force-reinstalls aeson' – thoferon