首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Intero:来自堆栈配置的ghc不匹配

Intero:来自堆栈配置的ghc不匹配
EN

Stack Overflow用户
提问于 2017-12-30 00:23:33
回答 2查看 2.2K关注 0票数 6

intero-mode尝试自动安装Intero时,它会产生以下错误:

代码语言:javascript
复制
Intero is not installed in the Stack environment.

Installing intero-0.1.23 automatically ...


Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for intero-0.1.23:
    ghc-8.2.2 from stack configuration does not match >=7.8 && <8.2.2 (latest matching version
              is 8.2.1)
needed since intero is a build target.

Some potential ways to resolve this:

  * Recommended action: try adding the following to your extra-deps
    in <project directory>\stack.yaml:

- ghc-8.2.1

  * Set 'allow-newer: true' to ignore all version constraints and build anyway.

  * You may also want to try using the 'stack solver' command.

Plan construction failed.
Could not install Intero!

We don't know why it failed. Please read the above output and try
installing manually. If that doesn't work, report this as a
problem.

WHAT TO DO NEXT

If you don't want to Intero to try installing itself again for
this project, just keep this buffer around in your Emacs.

If you'd like to try again next time you try use an Intero
feature, kill this buffer.

这种情况在升级到lts-10.0之后就开始发生了,但甚至在此之前,Intero就出现了问题(我在https://github.com/commercialhaskell/intero/issues/499上报告了这一点)。这里发生了什么,我该怎么解决呢?我在Windows 10上使用emacs和emacs emacs。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-01-02 04:25:55

我一点也不是emacs专家,但我知道intero模式elisp文件指定了包的确切版本。您需要更新到更新的emacs包。我不知道你一开始是如何安装intero模式的,但我想(和我一样)你是从MELPA上得到的。最终,我转向通过Git安装,这样我就可以更容易地升级和测试尚未在MELPA上发布的特性。你可以通过以下方式做到这一点:

  1. 在文件系统的某个地方克隆https://github.com/commercialhaskell/intero,例如~/.emacs.d/vendor/intero
  2. ~/.emacs(load-file "~/.emacs.d/vendor/intero/elisp/intero.el")中添加如下一行
票数 2
EN

Stack Overflow用户

发布于 2018-01-02 15:16:14

首先是stack update,然后是stack install intero,以安装最新版本的intero。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48029802

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档