2014-12-20 42 views
1

我试图建立一个耶索德项目如下:耶索德与stackage未能安装由于依赖问题

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 

回答

2

看来,自制软件已经修复标准GHC安装,因为它有一个不同的版本惊天动地库比官方GHC的出货。我不知道为什么会发生。快速解决方法是从cabal.config中删除Cabal行。你能否对Stackage提出一个问题?我想深究为什么会发生这种情况。

+0

要确认,你想要一个针对仓库的问题,而不是自制。 – 11Kilobytes

+0

是的,这个问题很好,谢谢。如果有人从自制软件中解释为什么他们有不同的版本,这将是很好的。现在我想到了,理论上* *所有Mac用户都有不同版本的Cabal库。 –

+0

顺便说一下,当我将yesod-bin安装到我的沙盒中时,我现在该做什么。如果我使用./cabal-sandbox/bin/yesod init创建一个新项目,我会得到一个没有cabal-sandbox的新子目录。那么,我该如何在当前目录中创建一个新项目? – 11Kilobytes