【问题标题】:Trying to install diagrams on OS X尝试在 OS X 上安装图表
【发布时间】:2016-02-02 14:42:04
【问题描述】:

我正在尝试在 OS X 上安装图表。下载它时,我收到这种错误消息:

Building linear-1.20.4...
Failed to install linear-1.20.4
Build log ( /Users/Max/.cabal-sandbox/logs/linear-1.20.4.log ):

然后在一些成功的链接包之后的一段时间:

[ 5 of 22] Compiling Linear.V0        ( src/Linear/V0.hs, dist/dist-sandbox-9f82d52a/build/Linear/V0.o )

src/Linear/V0.hs:318:25:
    ‘eq1’ is not a (visible) method of class ‘Eq1’

src/Linear/V0.hs:319:25:
    ‘compare1’ is not a (visible) method of class ‘Ord1’

src/Linear/V0.hs:320:25:
    ‘showsPrec1’ is not a (visible) method of class ‘Show1’

src/Linear/V0.hs:321:25:
    ‘readsPrec1’ is not a (visible) method of class ‘Read1’

cabal: Error: some packages failed to install:
active-0.2.0.8 depends on linear-1.20.4 which failed to install.
diagrams-1.3 depends on linear-1.20.4 which failed to install.
diagrams-contrib-1.3.0.8 depends on linear-1.20.4 which failed to install.
diagrams-core-1.3.0.5 depends on linear-1.20.4 which failed to install.
diagrams-lib-1.3.0.9 depends on linear-1.20.4 which failed to install.
diagrams-svg-1.3.1.10 depends on linear-1.20.4 which failed to install.
force-layout-0.4.0.3 depends on linear-1.20.4 which failed to install.
linear-1.20.4 failed during the building phase. The exception was:
ExitFailure 1

有人知道怎么解决吗?

我的 gtk 和 cabal 都是最新的。

谢谢你:)

【问题讨论】:

  • 您的 ghc 版本可能太低,所以 DeriveGeneric 语言扩展无法正常工作。试试 stack build tool,它会为你安装正确版本的 ghc。
  • 看起来Eq1 和朋友是由transformers(或者可能是transformers-compat)包提供的。它选择了transformerstransformers-compat的哪个版本?
  • (特别是,如果您使用的是--allow-newer,这可能会导致这里出现问题。)
  • 我在 debian 8 上遇到了同样的问题。ghc 版本 7.6.3

标签: haskell osx-elcapitan cabal haskell-diagrams


【解决方案1】:

您在该版本的 linear 中遇到了与 transformers 库的某些版本有关的错误。

查看以下票证:

https://github.com/ekmett/linear/issues/97

评论指出:“已经在 4a2aab7 中修复,还没有在 Hackage 上。在此期间,使用 transformers > 0.3 或 transformers-compat

【讨论】:

    猜你喜欢
    • 2018-05-16
    • 2016-04-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-30
    • 2017-09-07
    • 2013-06-10
    相关资源
    最近更新 更多