我是 Haskell 的新手,我正在嘗試使用一個名為 graphics.gloss 的庫,但我不斷收到此錯誤,我不確定到底是什么問題。
PS E:\TicTacToeGame> cabal install base-4.2
cabal.exe: Could not resolve dependencies:
[__0] trying: TicTacToeGame-0.1.0.0 (user goal)
[__1] trying: gloss-1.13.2.1 (dependency of TicTacToeGame)
[__2] next goal: bytestring (dependency of gloss)
[__2] rejecting: bytestring-0.11.1.0/installed-0.11.1.0 (conflict: gloss =>
bytestring>=0.10 && <0.11)
[__2] skipping: bytestring-0.11.2.0, bytestring-0.11.1.0, bytestring-0.11.0.0
(has the same characteristics that caused the previous version to fail:
excluded by constraint '>=0.10 && <0.11' from 'gloss')
[__2] trying: bytestring-0.10.12.1
[__3] next goal: base (dependency of TicTacToeGame)
[__3] rejecting: base-4.16.0.0/installed-4.16.0.0 (conflict: bytestring =>
base>=4.2 && <4.16)
[__3] skipping: base-4.16.0.0 (has the same characteristics that caused the
previous version to fail: excluded by constraint '>=4.2 && <4.16' from
'bytestring')
[__3] rejecting: base-4.15.1.0, base-4.15.0.0, base-4.14.3.0, base-4.14.2.0,
base-4.14.1.0, base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0,
base-4.11.0.0, base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0,
base-4.8.2.0, base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1,
base-4.7.0.0, base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0,
base-4.4.1.0, base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2,
base-4.2.0.1, base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2,
base-3.0.3.1 (constraint from non-upgradeable package requires installed
instance)
[__3] fail (backjumping, conflict set: TicTacToeGame, base, bytestring)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, bytestring, gloss, TicTacToeGame
Try running with --minimize-conflict-set to improve the error message.
先感謝您
uj5u.com熱心網友回復:
的版本base與 GHC 的版本相關聯。看起來您使用的是 GHC 9.2,許多庫仍然不支持該版本。您可以嘗試傳遞--allow-newer給 cabal,但我預計這會導致其他問題。而是降級到舊的 GHC 主要版本。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/423009.html
標籤:
