4
votes

I have tried to follow the Yesod quick start from the official website, but when running yesod devel (after installation and running yesod init) it fails to build due to a missing dependency if I use sqlite, postgresql, postgresql+fay or mysql (the 'simple' option from yesod-init works fine).

The error messages given are:

For sqlite:

cabal: At least the following dependencies are missing:
persistent-sqlite ==1.3.*

For postgresql:

cabal: At least the following dependencies are missing:
persistent-postgresql ==1.3.*

For postgres + fay:

cabal: At least the following dependencies are missing:
fay >=0.16, persistent-postgresql ==1.3.*, yesod-fay >=0.5.0.1

For mysql:

cabal: At least the following dependencies are missing:
persistent-mysql  ==1.3.*

For mongoDB:

cabal: At least the following dependencies are missing:
persistent-mongoDB ==1.3.*

Does anyone know what is going wrong and how it can be fixed?

Update:

I was able to fix some of the problems by installing, separately from the yesod-platform, some of the missing dependencies.

cabal install persistent-sqlite fixed any problems using sqlite.

cabal install persistent-postgresql and cabal install persistent-mysql worked after installing some extra distribution packages to my Mint 16 system (libpq-dev and libmysqlclient-dev).

cabal install persistent-mongodb failed with an error I could not resolve:

Resolving dependencies... Configuring persistent-mongoDB-1.3.1... Building persistent-mongoDB-1.3.1... Preprocessing library persistent-mongoDB-1.3.1... [1 of 1] Compiling Database.Persist.MongoDB ( Database/Persist/MongoDB.hs, dist/build/Database/Persist/MongoDB.o )

Database/Persist/MongoDB.hs:420:26: Not in scope: type constructor or class `MonadThrow' Failed to install persistent-mongoDB-1.3.1 cabal: Error: some packages failed to install: persistent-mongoDB-1.3.1 failed during the building phase. The exception was: ExitFailure 1

Does anybody know how to resolve this issue?

Update:

This final problem has been solved by the maintainer updating the cabal package.

1

1 Answers

2
votes

There is a new version without this error (I have installed persistent-mongoDB-1.3.1.1, the previous version had the error you found).

Do a cabal update to refresh the packages list and try again.