[英]Could not resolve dependencies while installing libraries with cabal
我試圖在 Window 10 上使用 cabal 安裝庫的每一次努力都導致了同樣的錯誤:
cabal install gtk
cabal.exe: Could not resolve dependencies:
[__0] trying: parconc-examples-0.4.8 (user goal)
[__1] next goal: base (dependency of parconc-examples)
[__1] rejecting: base-4.15.0.0/installed-4.15.0.0 (conflict: parconc-examples
=> base>=4.5 && <4.14)
[__1] skipping: base-4.15.0.0, base-4.14.2.0, base-4.14.1.0, base-4.14.0.0
(has the same characteristics that caused the previous version to fail:
excluded by constraint '>=4.5 && <4.14' from 'parconc-examples')
[__1] rejecting: 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)
[__1] fail (backjumping, conflict set: base, parconc-examples)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, parconc-examples
它在 Linux 上運行得很好,但我還沒有找到如何在 Windows 上解決這個問題。
您的base
庫版本是4.15.0.0
。 base
的特殊之處在於它的版本與您的 GHC 版本相關聯,這似乎是 GHC 9.0.1。
因此,與其他庫不同,cabal 不能在某些包的build-depends:
需要時簡單地安裝先前版本的base
。
parconc-examples
對base
有以下約束: >=4.5 && <4.14
。 所以版本4.15
不被接受(“不可升級包的約束需要安裝實例”)。
您可以嘗試的一件事是傳遞額外的選項--allow-newer=base
,例如cabal install --allow-newer=base gtk
。 這將放寬限制。
但這不是靈丹妙葯: parconc-examples
(或gtk
所需的其他包)實際上可能無法使用base == 4.15
構建,因為它可能使用base == 4.14
某些方面,該方面在非向后兼容中發生了變化大大地。 畢竟,防止此類構建失敗是邊界的目的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.