I'm trying to follow the following Yesod tutorial http://yannesposito.com/Scratch/en/blog/Yesod-tutorial-for-newbies/, but I'm getting the following error when trying to do cabal-dev install
cabal-dev install -v
/usr/bin/cabal --numeric-version
/usr/local/bin/ghc-pkg --version
Using ghc-pkg 7.6.3
/usr/bin/cabal --version
/usr/bin/cabal --config-file=/home/pedro/HaskellPlaying/TestApi/MyApiTest/cabal-dev/cabal.config install --verbose=2
Reading available packages...
Choosing modular solver.
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: MyApiTest-0.0.0 (user goal)
trying: fast-logger-2.0.0/installed-a9d... (dependency of MyApiTest-0.0.0)
next goal: warp (dependency of MyApiTest-0.0.0)
rejecting: warp-2.0.1, 2.0.0.1, 2.0.0 (conflict: MyApiTest => warp>=1.3 &&
<1.4)
trying: warp-1.3.10.1
next goal: wai (dependency of warp-1.3.10.1)
rejecting: wai-2.0.0 (conflict: warp => wai>=1.3 && <1.5)
trying: wai-1.4.1
next goal: wai-extra (dependency of MyApiTest-0.0.0)
rejecting: wai-extra-2.0.0.1, 2.0.0 (conflict: MyApiTest => wai-extra>=1.3 &&
<1.4)
rejecting: wai-extra-1.3.4.6, 1.3.4.5, 1.3.4.4, 1.3.4.3, 1.3.4.2, 1.3.4.1,
1.3.4, 1.3.3.2, 1.3.3.1, 1.3.3, 1.3.2.4 (conflict:
fast-logger==2.0.0/installed-a9d..., wai-extra => fast-logger>=0.2 && <0.4)
rejecting: wai-extra-1.3.2.3, 1.3.2.2, 1.3.2.1, 1.3.2, 1.3.1.1, 1.3.1,
1.3.0.5, 1.3.0.4, 1.3.0.3, 1.3.0.2, 1.3.0.1, 1.3.0 (conflict: wai==1.4.1,
wai-extra => wai>=1.3 && <1.4)
rejecting: wai-extra-1.2.0.6, 1.2.0.5, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1,
1.2.0, 1.1.0.1, 1.1.0, 1.0.0.1, 1.0.0, 0.4.6, 0.4.5.2, 0.4.5.1, 0.4.5, 0.4.4,
0.4.3, 0.4.2, 0.4.1.2, 0.4.1.1, 0.4.0.3, 0.4.0.2, 0.4.0.1, 0.4.0, 0.3.3,
0.3.2.1, 0.3.2, 0.3.1, 0.3.0, 0.2.4.2, 0.2.4.1, 0.2.4, 0.2.3, 0.2.2.2,
0.2.2.1, 0.2.2, 0.2.1, 0.2.0, 0.1.3.1, 0.1.3, 0.1.2.1, 0.1.2, 0.1.1, 0.1.0,
0.0.0.2, 0.0.0.1, 0.0.0 (conflict: MyApiTest => wai-extra>=1.3 && <1.4)
I'm new cabal so I don't really understand the problem, though it seems like the issue is that someone wants wai-extra to be one version while something else wants it to be something else.
Could someone tell me what the issue is and how to fix it? Thanks.
It looks to me like you have a mismatch between the version of the scaffolded site and the version of Yesod you have installed. If you run yesod version
, you can see which version of the scaffolded site you have generated.
Your best bet is to install the newest version of both the yesod-bin
package and the yesod-platform
package. You can find instructions for this on the Yesod quick start page, but it's essentially the command:
cabal install yesod-bin yesod-platform
Then try generating a new scaffolding, and you should hopefully be good-to-go.