简体   繁体   English

Haskell“堆栈”不会加载 ghc-mod

[英]Haskell "stack" won't load ghc-mod

I think I might have created confusion.我想我可能造成了混乱。 Here are bash command line entries I used to install Stack to start with:以下是我用来安装 Stack 的 bash 命令行条目:

curl -sSL https://get.haskellstack.org/ | sh  
echo 'export PATH=\$HOME/.local/bin:\$PATH' >> ~/.bashrc  
stack setup

So far this works, and I can test the compiler and the interactive environment and they work fine (ghc and ghci).到目前为止,这是有效的,我可以测试编译器和交互式环境,它们工作正常(ghc 和 ghci)。

Then, when I try to install ghc-mod, it fails:然后,当我尝试安装 ghc-mod 时,它失败了:

stack install ghc-mod

This command fails saying that ghc-boot-8.4.4 is not in my indices.此命令未能说明 ghc-boot-8.4.4 不在我的索引中。 I get the same error if I remove everything, start over, and install the bundled version (Haskell.org).如果我删除所有内容,重新开始并安装捆绑版本(Haskell.org),我会收到相同的错误。

Again, any help much appreciated.再次,非常感谢任何帮助。

=== Previous post === All: A few more details. === 上一篇文章 === 全部:更多细节。 I have tried the suggestions, and I've also tried removing the ~/.stack/indices directory and then running "stack update" to refresh it.我已经尝试了这些建议,我也尝试删除 ~/.stack/indices 目录,然后运行“stack update”来刷新它。

The same error still happens when trying to do "stack install ghc-mod" or "stack build ghc-mod", ie "The following package identifiers were not found in your indices: ghc-boot-8.4.4."尝试执行“stack install ghc-mod”或“stack build ghc-mod”时仍会发生相同的错误,即“在您的索引中找不到以下包标识符:ghc-boot-8.4.4”。

Any help much appreciated.非常感谢任何帮助。

Best regards, David最好的问候,大卫

=== Original Question === Problem: stack install ghc-mod fails, missing ghc-boot-8.4.4 === 原始问题=== 问题:stack install ghc-mod 失败,缺少 ghc-boot-8.4.4

My question is: how do I get my environment to load the required modules (ghc-boot) into the index?我的问题是:如何让我的环境将所需的模块(ghc-boot)加载到索引中?

Hello All: My apologies in advance for being an absolute newbie to Haskell.大家好:我很抱歉成为 Haskell 的绝对新手。 Better late than never.迟到总比不到好。 Here's the background.这是背景。

My goal is to get “Atom with Haskell” working on My MacOS version 10.13.6.我的目标是让“Atom with Haskell”在我的 MacOS 版本 10.13.6 上运行。

There are a couple of thoughtful pages that attempt to lead one through getting things to work: http://www.jkrause.io/blog/2016/03/26/setup-atom-io-for-developing-haskell-on-osx/ https://github.com/simonmichael/haskell-atom-setup有几个深思熟虑的页面试图引导人们完成工作: http : //www.jkrause.io/blog/2016/03/26/setup-atom-io-for-developing-haskell-on- osx/ https://github.com/simonmichael/haskell-atom-setup

I have attempted to follow these instructions loading the GHC environment, and I've also tried loading the complete platform: https://www.haskell.org/platform/mac.html我尝试按照这些说明加载 GHC 环境,并且我也尝试加载完整的平台: https : //www.haskell.org/platform/mac.html

GHC and GHCi appear to work just fine in all three cases. GHC 和 GHCi 似乎在所有三种情况下都能正常工作。

The problem comes with the following step, and happens the same way following either of the two sets of instructions:问题出现在以下步骤中,并且按照两组指令中的任何一组以相同的方式发生:

$ stack install ghc-mod $ 堆栈安装ghc-mod

Didn't see ghc-boot-8.4.4 in your package indices
Updating and trying again.
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/          
Downloading timestamp                                                  
No updates to your package index were found                           
Update complete                                                        
The following package identifiers were not found in your indices: ghc-boot-8.4.4
Possible candidates: ghc-boot-8.4.3, ghc-boot-8.4.1, ghc-boot-8.4.2.

I've tried many things, but have been unable to move past this error, ie that ghc-boot-8.4.4 is not found in my index.我尝试了很多东西,但一直无法克服这个错误,即在我的索引中找不到 ghc-boot-8.4.4。 I'm using lts-12.17.我正在使用 lts-12.17。 Examining the page for its-12.17, it appears that ghc-boot-8.4.4 should be in the index, see https://www.stackage.org/lts-12.17 .检查 its-12.17 的页面,似乎 ghc-boot-8.4.4 应该在索引中,请参阅https://www.stackage.org/lts-12.17

Thanks, David谢谢,大卫

ghc-boot-8.4.4 is not present on hackage, for some reason.出于某种原因, hackage 中不存在 ghc-boot-8.4.4。 (As of Nov 11, 2018) (截至 2018 年 11 月 11 日)

http://hackage.haskell.org/package/ghc-boot http://hackage.haskell.org/package/ghc-boot

I'm not sure why stack would need to find it in the hackage index, though.不过,我不确定为什么 stack 需要在 hackage 索引中找到它。 It comes already installed with ghc.它已经安装了 ghc。

ghc-boot for 8.4.4 exists - https://www.stackage.org/lts-12.17/package/ghc-boot-8.4.4 8.4.4 的ghc-boot存在 - https://www.stackage.org/lts-12.17/package/ghc-boot-8.4.4

If you run stack update and then try again, that may solve it.如果您运行stack update然后再试一次,可能会解决它。

If not, then I would switch back to resolver lts-12-14 and use GHC 8.4.3 instead.如果没有,那么我将切换回解析器lts-12-14并改用 GHC 8.4.3。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM