简体   繁体   中英

cabal dependencies are missing in Yesod and stack

Hi i try to create a new proyect for yesod using stack, follow the quickstart tutorial; to create the scaffolding I use the command:

stack new my-project yesod-postgres && cd my-project

But when run stack exec -- yesod devel get:

cabal: At least the following dependencies are missing:
classy-prelude >=0.10.2,
classy-prelude-conduit >=0.10.2,
classy-prelude-yesod >=0.10.2,
data-default -any,
hjsmin >=0.1 && <0.3,
monad-logger ==0.3.*,
persistent >=2.0 && <2.6,
persistent-postgresql >=2.1.1 && <2.6,
persistent-template >=2.0 && <2.6,
safe -any,
yesod >=1.4.3 && <1.5,
yesod-auth >=1.4.0 && <1.5,
yesod-core >=1.4.17 && <1.5,
yesod-form >=1.4.0 && <1.5,
yesod-static >=1.4.0.3 && <1.6

I try with the command stack exec -- cabal install but get:

cabal: Use of GHC's environment variable GHC_PACKAGE_PATH is incompatible with
Cabal. Use the flag --package-db to specify a package database (it can be used multiple times).

Thanks for the help

EDIT

The command to install the postgres library in ubuntu:

sudo apt-get install -y libpq-dev

As described in the Yesod quick start page , you have to do this inside the project:

stack build yesod-bin cabal-install --install-ghc
stack build

And then,

stack exec -- yesod devel

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM