gpt4 book ai didi

haskell - 如何用 cabal 降级基地?

转载 作者:行者123 更新时间:2023-12-04 13:26:10 27 4
gpt4 key购买 nike

我正在尝试安装一个名为 clanki 的程序在 Windows 10 上。在它的安装文档中,它说要使用“cabal install clanki”。我下载了cabal,然后下载了ghc。现在我遇到了包的版本问题 base .

$ cabal install clanki
Resolving dependencies...
cabal.exe: Could not resolve dependencies:
trying: clanki-1.2.7 (user goal)
next goal: base (dependency of clanki-1.2.7)
rejecting: base-4.9.0.0/installed-4.9... (conflict: clanki => base<=4.9.0)
rejecting: 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)
Dependency tree exhaustively searched.

所以 clanki 要求 base 比 4.9 更老(堆栈比 cabal 更清楚地说明了这一点),然后我想将 base 降级到 4.8.2.0。当我尝试 ghc-pkg unregister base ,它不允许我。甚至没有 --force :
$ ghc-pkg unregister base --force
unregistering would break the following packages: xhtml-3000.2.1 Win32-2.3.1.1 transformers-0.5.2.0 time-1.6.0.1 template-haskell-2.11.0.0 process-1.4.2.0 pretty-1.1.3.3 hpc-0.6.0.3 hoopl-3.10.2.1 haskeline-0.7.2.3 ghci-8.0.1 ghc-boot-th-8.0.1 ghc-boot-8.0.1 ghc-8.0.1 filepath-1.4.1.0 directory-1.2.6.2 deepseq-1.4.2.0 containers-0.5.7.1 Cabal-1.24.0.0 bytestring-0.10.8.1 binary-0.8.3.0 array-0.5.1.1 (ignoring)

正如我所提到的,我也尝试过使用堆栈,但最终它也归结为错误的 base 版本。我怎样才能降级这个包?

最佳答案

根据@leftroundabout 的回答,base 的上限在这个包是假的。在这种情况下,或者只是如果你觉得大胆,你可以指示cabal使用适当的选项忽略依赖项的上限:

cabal install clanki --allow-newer=base

关于haskell - 如何用 cabal 降级基地?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40022261/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com