如何处理生成Hoogle数据库时出现的Zlib数据流格式错误?

huangapple go评论94阅读模式
英文:

How to address Zlib data stream format error when generating hoogle database?

问题

我正在尝试为将来在Haskell LSP与neovim中使用生成本地的hoogle数据库。

目前我正在运行MacOS Monterey(12.6)。我通过cabal安装了hoogle版本5.10.18.3。

当运行hoogle generate时,我收到以下消息:

$ hoogle generate
Starting generate
Reading Cabal... hoogle: Codec.Compression.Zlib: compressed data stream format error (incorrect header check)

有没有人知道如何继续?键入hoogle --helphoogle generate --help并没有提供太多信息。

英文:

I am trying to generate a local hoogle database for its eventual use in a Haskell LSP with neovim.

Currently I'm running MacOS Monterey (12.6). I installed hoogle version 5.10.18.3 via cabal.

When running hoogle generate I get the following message:

$ hoogle generate
Starting generate
Reading Cabal... hoogle: Codec.Compression.Zlib: compressed data stream format error (incorrect header check)

Does anyone have an idea of how to proceed? Typing hoogle --help or hoogle generate --help does not give much information.

答案1

得分: 0

尝试执行 hoogle generate --download 命令。

你可能遇到了某种损坏的下载文件。当 hoogle 尝试重新生成数据库时,默认情况下不会进行下载。Hoogle 文档

对Stackage进行索引

运行 hoogle generate 命令以为当前版本的 Stackage LTS 生成索引。该命令将根据需要从网络下载必要的输入并将其缓存(与数据库相同的目录)。要强制重新下载,请传递 --download。如果数据找不到,要求不进行下载并失败,请传递 --download=no。结果的链接将指向 Hackage。

当我运行 --download 标志时,会获取以下文件:

下载 https://www.stackage.org/nightly/cabal.config... 1.81秒
下载 https://www.stackage.org/lts/cabal.config... 0.75秒
下载 https://raw.githubusercontent.com/haskell/haskell-platform/master/hptool/src/Releases2015.hs... 1.34秒
下载 https://hackage.haskell.org/packages/index.tar.gz... 3.67秒
下载 https://hackage.haskell.org/packages/hoogle.tar.gz... 6.89秒
英文:

Try hoogle generate --download.

You probably had a corrupted download somehow. When hoogle attempts to re-generate the database it does not by default download. Hoogle documentation

> Index all of Stackage
>
> Run hoogle generate to generate an index for the current version of Stackage LTS. This command downloads the necessary inputs from the web as required and caches them (in the same directory as the database). To force redownloading pass --download. To demand no downloading, failing if the data cannot be found, pass --download=no. Links to the results will point at Hackage.

When I ran the --download flag, these files were fetched:

Downloading https://www.stackage.org/nightly/cabal.config... 1.81s
Downloading https://www.stackage.org/lts/cabal.config... 0.75s
Downloading https://raw.githubusercontent.com/haskell/haskell-platform/master/hptool/src/Releases2015.hs... 1.34s
Downloading https://hackage.haskell.org/packages/index.tar.gz... 3.67s
Downloading https://hackage.haskell.org/packages/hoogle.tar.gz... 6.89s

huangapple
  • 本文由 发表于 2023年2月18日 09:11:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/75490558.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定