简体   繁体   English

Yesod和堆栈中缺少cabal依赖项

[英]cabal dependencies are missing in Yesod and stack

Hi i try to create a new proyect for yesod using stack, follow the quickstart tutorial; 您好我尝试使用堆栈为yesod创建一个新的proyect,按照快速入门教程; 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: 但是当运行stack exec -- yesod devel得到:

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: 我尝试使用命令stack exec -- cabal install但得到:

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: 在ubuntu中安装postgres库的命令:

sudo apt-get install -y libpq-dev

As described in the Yesod quick start page , you have to do this inside the project: Yesod快速入门页面所述 ,您必须在项目中执行此操作:

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

And then, 接着,

stack exec -- yesod devel

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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