ori*_*iaj 2 haskell cabal-install yesod haskell-stack
您好我尝试使用堆栈为yesod创建一个新的proyect,按照快速入门教程; 创建脚手架我使用命令:
stack new my-project yesod-postgres && cd my-project
Run Code Online (Sandbox Code Playgroud)
但是当跑步时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
Run Code Online (Sandbox Code Playgroud)
我尝试使用该命令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).
Run Code Online (Sandbox Code Playgroud)
谢谢您的帮助
编辑
在ubuntu中安装postgres库的命令:
sudo apt-get install -y libpq-dev
Run Code Online (Sandbox Code Playgroud)
如Yesod快速入门页面所述,您必须在项目中执行此操作:
stack build yesod-bin cabal-install --install-ghc
stack build
Run Code Online (Sandbox Code Playgroud)
然后,
stack exec -- yesod devel
Run Code Online (Sandbox Code Playgroud)