我正在尝试通过 cabal 安装音乐套件以与 Haskell 一起使用。按照说明,这里http://music-suite.github.io/docs/ref/,建议下载 Lilypond,我进入cabal install lilypond
并下载成功。
当我尝试通过 cabal 安装音乐套件时,问题就开始了。这是发生的事情:
mm$ cabal install music-suite
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: music-suite-1.9.0 (user goal)
[__1] trying: musicxml2-1.9.0 (dependency of music-suite)
[__2] trying: base-4.11.1.0/installed-4.1... (dependency of musicxml2)
[__3] trying: music-score-1.9.0 (dependency of music-suite)
[__4] trying: vector-space-points-0.2.1.2 (dependency of music-score)
[__5] next goal: transformers (dependency of music-score)
[__5] rejecting: transformers-0.5.5.0/installed-0.5..., transformers-0.5.6.2,
transformers-0.5.5.0, transformers-0.5.4.0, transformers-0.5.2.0,
transformers-0.5.1.0, transformers-0.5.0.1, transformers-0.5.0.0 (conflict:
music-score => transformers>=0.4.3.0 && <0.5)
[__5] rejecting: transformers-0.4.3.0 (conflict:
base==4.11.1.0/installed-4.1..., transformers => base>=2 && <4.9)
[__5] rejecting: transformers-0.4.2.0, transformers-0.4.1.0,
transformers-0.3.0.0, transformers-0.2.2.1, transformers-0.2.1.0,
transformers-0.2.0.0, transformers-0.1.4.0, transformers-0.1.3.0,
transformers-0.1.1.0, transformers-0.1.0.1, transformers-0.0.1.0,
transformers-0.0.0.0, transformers-0.5.6.1, transformers-0.5.6.0,
transformers-0.5.3.1, transformers-0.5.3.0, transformers-0.5.0.2,
transformers-0.4.0.0, transformers-0.2.2.0, transformers-0.1.0.0 (conflict:
music-score => transformers>=0.4.3.0 && <0.5)
[__5] fail (backjumping, conflict set: base, music-score, transformers)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: music-score, base, transformers,
music-suite, musicxml2, vector-space-points
究竟出了什么问题?我该如何解决这个问题?
我试图通过堆栈安装它,但出现了以下消息:
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for music-suite-1.9.0:
abcnotation must match ==1.9.0, but the stack configuration has no specified version (latest matching version
is 1.9.0)
lilypond must match ==1.9.0, but the stack configuration has no specified version (latest matching version
is 1.9.0)
music-articulation must match ==1.9.0, but the stack configuration has no specified version (latest matching
version is 1.9.0)
music-dynamics must match ==1.9.0, but the stack configuration has no specified version (latest matching version
is 1.9.0)
music-dynamics-literal must match ==1.9.0, but the stack configuration has no specified version (latest matching
version is 1.9.0)
music-parts must match ==1.9.0, but the stack configuration has no specified version (latest matching version
is 1.9.0)
music-pitch must match ==1.9.0, but the stack configuration has no specified version (latest matching version
is 1.9.0)
music-pitch-literal must match ==1.9.0, but the stack configuration has no specified version (latest matching
version is 1.9.0)
music-preludes must match ==1.9.0, but the stack configuration has no specified version (latest matching version
is 1.9.0)
music-score must match ==1.9.0, but the stack configuration has no specified version (latest matching version
is 1.9.0)
musicxml2 must match ==1.9.0, but the stack configuration has no specified version (latest matching version
is 1.9.0)
needed since music-suite is a build target.
Some different approaches to resolving this:
* Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build
configuration. This can be convenient when dealing with many complicated constraint errors, but results may be
unpredictable.
* Recommended action: try adding the following to your extra-deps
in /Users/mm/.stack/global-project/stack.yaml:
- abcnotation-1.9.0
- lilypond-1.9.0
- music-articulation-1.9.0
- music-dynamics-1.9.0
- music-dynamics-literal-1.9.0
- music-parts-1.9.0
- music-pitch-1.9.0
- music-pitch-literal-1.9.0
- music-preludes-1.9.0
- music-score-1.9.0
- musicxml2-1.9.0
我已经添加了所有这些依赖项(这里也列出了http://hackage.haskell.org/package/music-suite-1.9.0/dependenciesThe same package name is used in multiple local packagesbase-orphans used in:
- PLIndex "base-orphans-0.8"
- PLIndex "base-orphans-0.3.3"
),但是当我stack install music-suite
在终端输入时我收到了。
当我删除其中一个依赖项时,我收到一条消息,要求恢复它们,并且我还收到以下错误:
错误:在构建构建计划时,遇到以下异常:
In the dependencies for cassava-0.4.4.0:
base-4.12.0.0 from stack configuration does not match >=4.5 && <4.9 (latest matching version is 4.8.2.0)
needed due to music-suite-1.9.0 -> cassava-0.4.4.0
In the dependencies for comonad-4.3:
base-4.12.0.0 from stack configuration does not match >=0 && <0
needed due to music-suite-1.9.0 -> comonad-4.3
In the dependencies for directory-1.2.7.1:
base-4.12.0.0 from stack configuration does not match >=4.5 && <4.11 (latest matching version is 4.10.1.0)
needed due to music-suite-1.9.0 -> directory-1.2.7.1
In the dependencies for monadplus-1.4.2:
base-4.12.0.0 from stack configuration does not match >=4 && <4.11 (latest matching version is 4.10.1.0)
needed due to music-suite-1.9.0 -> monadplus-1.4.2
In the dependencies for music-score-1.9.0:
base-orphans-0.8 from stack configuration does not match >=0.1 && <0.4 (latest matching version is 0.3.3)
needed due to music-suite-1.9.0 -> music-score-1.9.0
In the dependencies for process-1.2.3.0:
base-4.12.0.0 from stack configuration does not match >=4.4 && <4.9 (latest matching version is 4.8.2.0)
needed due to music-suite-1.9.0 -> process-1.2.3.0
In the dependencies for transformers-0.4.3.0:
base-4.12.0.0 from stack configuration does not match >=2 && <4.9 (latest matching version is 4.8.2.0)
needed due to music-suite-1.9.0 -> transformers-0.4.3.0
In the dependencies for vector-space-points-0.2.1.2:
base-4.12.0.0 from stack configuration does not match >=4.0 && <4.12 (latest matching version is 4.11.1.0)
needed due to music-suite-1.9.0 -> vector-space-points-0.2.1.2
Some different approaches to resolving this:
* Set 'allow-newer: true' to ignore all version constraints and build anyway.
* Consider trying 'stack solver', which uses the cabal-install solver to attempt to find some working build
configuration. This can be convenient when dealing with many complicated constraint errors, but results may be
unpredictable.