setup-Simple-Cabal在构建haskell-src-exts-1.16.0.1时无法安装

时间:2015-10-15 11:50:19

标签: haskell cabal haskell-stack

Stack尝试在已下载的stack install - repo目录下安装(ghc-mod haskell-src-exts-1.16.0.1,但是当它到达setup-Simple-Cabal时,发生了以下错误:

Process exited with code: ExitFailure 1
Logs have been written to: /home/julius/HaskApps/ghc-mod/.stack-work/logs/haskell-src-exts-1.16.0.1.log

Configuring haskell-src-exts-1.16.0.1...
setup-Simple-Cabal-1.18.1.5-x86_64-linux-ghc-7.8.4: The program happy version
>=1.17 is required but it could not be found.

setup-Simple-Cabal是ghc-mod的一部分 - 支持堆栈的安装(link to github)。因为有关mtl - 包的一些错误:

Failure when adding dependencies:    
  mtl: needed (>=2.2 && <2.3), 2.1.3.1 found (latest is 2.2.1)
needed for package: MonadRandom-0.3.0.2

Failure when adding dependencies:    
  MonadRandom: needed (>=0.1 && <0.5), couldn't resolve its dependencies
needed for package: either-4.3.4.1

Failure when adding dependencies:    
  monad-journal: needed (>=0.4), couldn't resolve its dependencies
needed for package: ghc-mod-0

Failure when adding dependencies:    
  either: needed (>=4.1 && <4.5), couldn't resolve its dependencies
needed for package: monad-journal-0.7.1

我执行stack solver --modify-stack-yaml --resolver=ghc-7.8并且它首先解决了(哈哈)问题。但是,显然似乎需要haskell-src-exts >=1.17。这个版本似乎甚至不存在。运行ag "haskell-src-exts >=1.17"不会返回任何结果。什么可以解决这个问题?

编辑: Sooo ......一切看起来都很奇怪。我使用stack install来安装所有内容。在此haskell-srcexts / happy问题之前,它没有抱怨任何事情。 但是,当我尝试stack solver时,会出现以下错误消息:

cabal: Could not resolve dependencies:
next goal: ghc-mod (user goal)
rejecting: ghc-mod-5.4.0.0, 5.3.0.0, 5.2.1.2, 5.2.1.1, 5.2.1.0, 5.2.0.0,
5.1.1.0, 5.1.0.2, 5.1.0.1, 5.1.0.0, 5.0.1.2, 5.0.1.1, 5.0.1, 5.0.0, 4.1.6,
4.1.5, 4.1.4, 4.1.3, 4.1.2, 4.1.1, 4.1.0, 4.0.2, 4.0.1, 4.0.0, 3.1.7, 3.1.6,
3.1.5, 3.1.4, 3.1.3, 3.1.2, 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.1.2, 2.1.1,
2.1.0, 2.0.3, 2.0.2, 2.0.1, 2.0.0, 1.12.5, 1.12.4, 1.12.3, 1.12.2, 1.12.1,
1.12.0, 1.11.5, 1.11.4, 1.11.3, 1.11.2, 1.11.1, 1.11.0, 1.10.18, 1.10.17,
1.10.16, 1.10.15, 1.10.14, 1.10.13, 1.10.12, 1.10.11, 1.10.10, 1.10.9, 1.10.8,
1.10.7, 1.10.6, 1.10.5, 1.10.4, 1.10.3, 1.10.2, 1.10.1, 1.10.0, 1.0.8, 1.0.7,
1.0.6, 1.0.5, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0, 0.6.2, 0.6.1, 0.6.0, 0.5.5,
0.5.4, 0.5.3, 0.5.2, 0.5.1, 0.4.4, 0.4.3, 0.4.2, 0.4.1, 0.4.0, 0.3.0, 0.2.0,
0.1.0 (global constraint requires ==0)
rejecting: ghc-mod-0 (global constraint requires ==5.2.1.2)
Dependency tree exhaustively searched.

这种“全球约束”是什么?我怀疑extra-deps中有一个格式错误的stack.yaml部分,但情况似乎并非如此。

EDIT2:stack.yaml:

flags:
  text:
    integer-simple: false
  QuickCheck:
    base4point8: false
  transformers-compat:
    three: true
packages:
- '.'
extra-deps:
- HUnit-1.3.0.0
- MonadRandom-0.1.13
- QuickCheck-2.8.1
- StateVar-1.1.0.1
- ansi-terminal-0.6.2.3
- async-2.0.2
- base-orphans-0.4.4
- bifunctors-5
- cabal-helper-0.3.5.0
- cereal-0.4.1.1
- cmdargs-0.10.13
- comonad-4.2.7.2
- contravariant-1.3.3
- cpphs-1.19.3
- data-default-0.5.3
- data-default-class-0.0.1
- data-default-instances-base-0.0.1
- data-default-instances-containers-0.0.1
- data-default-instances-dlist-0.0.1
- data-default-instances-old-locale-0.0.1
- distributive-0.4.4
- djinn-ghc-0.0.2.3
- djinn-lib-0.0.1.2
- dlist-0.7.1.2
- doctest-0.10.1
- either-4.4.1
- exceptions-0.8.0.2
- extra-1.4.2
- free-4.12.1
- ghc-paths-0.1.0.9
- ghc-syb-utils-0.2.3
- hashable-1.2.3.3
- haskell-src-exts-1.16.0.1
- hlint-1.9.21
- hscolour-1.23
- hspec-2.2.0
- hspec-core-2.2.0
- hspec-discover-2.2.0
- hspec-expectations-0.7.2
- mmorph-1.0.4
- monad-control-1.0.0.4
- monad-journal-0.7.1
- mtl-2.1.3.1
- nats-1
- polyparse-1.11
- prelude-extras-0.4.0.2
- primitive-0.6.1.0
- profunctors-5.1.1
- quickcheck-io-0.1.2
- random-1.1
- semigroupoids-5.0.0.4
- semigroups-0.17.0.1
- setenv-0.1.1.3
- split-0.2.2
- stm-2.4.4
- syb-0.6
- tagged-0.8.1
- temporary-1.2.0.3
- text-1.2.1.3
- tf-random-0.5
- transformers-base-0.4.4
- transformers-compat-0.4.0.4
- uniplate-1.6.12
- unordered-containers-0.2.5.1
- void-0.7.1
resolver: lts-2.16

1 个答案:

答案 0 :(得分:3)

问题是happy,而不是haskell-src-exts。我误解了错误信息。所以我刚刚安装了happy包(通过APT),一切都很顺利。