【问题标题】:stack is not working after upgrading platform to 8.0.2 from 8.0.1将平台从 8.0.1 升级到 8.0.2 后堆栈无法正常工作
【发布时间】:2017-02-02 19:05:05
【问题描述】:

升级haskell平台包后,stack命令不起作用。

$ stack path
No compiler found, expected minor version match with ghc-8.0.1 (x86_64) (based on resolver setting in /home/eii/exercism/haskell/linked-list/stack.yaml).
To install the correct GHC into /home/eii/.stack/programs/x86_64-linux/, try running "stack setup" or use the "--install-ghc" flag.
$

我尝试了堆栈设置,但它正在尝试下载旧的 GHC (ghc-8.0.1)。我刚刚安装了 Haskell 平台 8.0.2(haskell-platform-8.0.2-unknown-posix--full-x86_64.tar.gz)。我使用的是 64 位 Linux。

$ stack setup
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
ghc-8.0.1:   15.69 MiB / 108.01 MiB ( 14.52%) downloaded...^Cuser interrupt
$

我可以用 ghc-8.0.2 编译,而且 ghci 工作正常。但我不能使用堆栈,也不能安装新包。

$ stack update
Downloading package index from https://s3.amazonaws.com/hackage.fpcomplete.com/00-index.tar.gz
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/00-index.tar.gz) ...
$ stack upgrade
Current Stack version: 1.3.2, available download version: 1.3.2
Skipping binary upgrade, your version is already more recent
$ which stack
/usr/local/bin/stack
$ ls -la /usr/local/bin/stack
lrwxrwxrwx. 1 root root 45 Feb  1 18:39 /usr/local/bin/stack -> /usr/local/haskell/ghc-8.0.2-x86_64/bin/stack
$ which ghc
/usr/local/bin/ghc
$ ls -la /usr/local/bin/ghc
lrwxrwxrwx. 1 root root 43 Feb  1 18:39 /usr/local/bin/ghc -> /usr/local/haskell/ghc-8.0.2-x86_64/bin/ghc
$

请帮忙。

【问题讨论】:

  • 我认为问题在于/home/eii/exercism/haskell/linked-list/stack.yaml 仍然包含需要 GHC-8.0.1 的相同解析器。要使用 GHC-8.0.2,您可以将解析器更改为最近的夜间快照,例如 nightly-2017-02-02。使用例如GHCi-8.0.2 你可以简单地运行stack --resolver nightly ghci。通常,堆栈可以并排安装许多不同版本的 GHC(i)。
  • 如果我上面的评论没有完全消除您的困惑,请稍微扩展一下堆栈的行为与您的预期有何不同。
  • 谢谢!我运行了“stack --resolver nightly-2017-02-03 setup”,它成功了!谢谢!

标签: haskell-stack


【解决方案1】:

前几天我在 Arch Linux 4.17.4 上遇到了这个问题。错误是:

No setup information found for ghc-8.4.3 on your platform.
This probably means a GHC bindist has not yet been added for OS key 'linux64-ncurses6', 'linux64-tinfo6'.
Supported versions: ghc-7.8.4, ghc-7.10.2, ghc-7.10.3, ghc-8.0.1, ghc-8.0.2, ghc-8.2.1, ghc-8.2.2, ghc-8.4.1, ghc-8.4.2

作为一种解决方法,我编辑了stack.yml 进行更改

lts-12.0

lts-11.15

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-04-04
    • 2013-07-03
    • 2017-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-20
    • 1970-01-01
    相关资源
    最近更新 更多