1

我试图建立一个yesod项目如下:

mkdir sample_blog
curl -o cabal.config www.stackage.org/nightly/cabal.config
cabal install alex happy yesod-bin

但是,我收到以下错误:

Resolving dependencies...
cabal: Could not resolve dependencies:
next goal: Cabal (user goal)
rejecting: Cabal-1.18.1.4/installed-d6c... (global constraint requires
==1.18.1.3)
trying: Cabal-1.18.1.3/installed-476...
trying: yesod-bin-1.4.2 (user goal)
next goal: ghc (dependency of yesod-bin-1.4.2)
rejecting: ghc-7.8.3/installed-1d5... (conflict:
Cabal==1.18.1.3/installed-476..., ghc => Cabal==1.18.1.4/installed-d6c...)
Dependency tree exhaustively searched.

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.

我已经使用自制软件安装了 GHC 和 cabal-install。版本:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.3


$ cabal --version
cabal-install version 1.20.0.4
using version 1.20.0.3 of the Cabal library
4

1 回答 1

2

似乎 Homebrew 已经修补了标准 GHC 安装,因为它附带的 Cabal 库版本与官方 GHC 不同。我不知道为什么会这样。一个快速的解决方法是Cabal从您的cabal.config. 你能就此提出反对 Stackage 的问题吗?我想深入了解为什么会发生这种情况。

于 2014-12-20T16:28:16.573 回答