我目前正在尝试使用stack安装helm。我创建了一个简单的项目
stack new sandbox
并添加 helm 作为对sandbox.cabal
:
library
hs-source-dirs: src
exposed-modules: Lib
build-depends: base >= 4.7 && < 5
, helm
default-language: Haskell2010
之后我照常运行stack build
并得到错误,表明我必须添加helm-0.7.1
我的stack.yaml
文件。我这样做并且也插入elerea-2.8.0
,因为这也是一个要求。这是我的stack.yaml
:
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver: lts-3.12
# Local packages, usually specified by relative directory name
packages:
- '.'
# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
extra-deps:
- helm-0.7.1
- elerea-2.8.0
# Override default flag values for local packages and extra-deps
flags: {}
# Extra package databases containing global packages
extra-package-dbs: []
# Control whether we use the GHC we find on the path
# system-ghc: true
# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: >= 0.1.4.0
# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64
# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
再次运行stack build
给我这个错误。
While constructing the BuildPlan the following exceptions were encountered:
-- Failure when adding dependencies:
helm: needed (-any), couldn't resolve its dependencies
needed for package: sandbox-0.1.0.0
-- Failure when adding dependencies:
cairo: needed (>0.12 && <0.13), 0.13.1.0 found (latest version available)
mtl: needed (>=2.1 && <2.2), 2.2.1 found (latest version available)
pango: needed (>0.12 && <0.13), 0.13.1.0 found (latest version available)
sdl2: needed (>=1.1 && <1.3), 1.3.1 found (latest is 2.1.0)
time: needed (>=1.4 && <1.5), 1.5.0.1 found (latest version available)
needed for package: helm-0.7.1
这个错误是什么意思?据我了解,它没有找到正确的版本。