安装管道包后的Haskell

问题描述 投票:0回答:1

我是 Haskell 的新手,正在为我的班级完成任务。我将它安装在 VSCode 中,下载了它的扩展,一切正常。但是安装 Conduit 库后我收到此错误:

ghc-9.4.7.exe: C:\cabal\store\ghc-9.4.7\hashable-1.4.3.0-1961fe79003fd705645c177b7f4aca0399a4d276\lib\libHShashable-1.4.3.0-1961fe79003fd705645c177b7f4aca0399a4d276.a(#7:LowLevel.o): Not a x86_64 PE+ file.
    ghc-9.4.7.exe: Unknown COFF 4 type in getHeaderInfo.
    panic! (the 'impossible' happened)
      GHC version 9.4.7:
            loadArchive "C:\\cabal\\store\\ghc-9.4.7\\hashable-1.4.3.0-1961fe79003fd705645c177b7f4aca0399a4d276\\lib\\libHShashable-1.4.3.0-1961fe79003fd705645c177b7f4aca0399a4d276.a": failed

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

你能帮我吗?提前谢谢您)

haskell cabal haskell-stack conduit
1个回答
0
投票

(不是答案) 我在 Windows 10 上也遇到同样的问题。 我刚刚按照页面中的所有默认说明重新(第一次)安装了 GHCup https://www.haskell.org/ghcup/

然后我开始遵循 https://www.haskell.org/ghcup/steps/ 的第一步说明 (是的,我也是新人...)

但是当我到达以下部分时,一切都开始下滑:在 ghci 中使用外部包

尝试 cabal-install 命令:

cabal repl --build-depends asyn
我最终得到以下结果:

I:\DevData\Haskell\test-cabal>cabal repl --build-depends async
Resolving dependencies...
Build profile: -w ghc-9.4.7 -O1
In order, the following will be built (use -v for more details):
 - hashable-1.4.3.0 (lib) (requires build)
 - async-2.2.4 (lib) (requires build)
 - test-cabal-0.1.0.0 (lib) (first run)
Starting     hashable-1.4.3.0 (lib)
Building     hashable-1.4.3.0 (lib)
Installing   hashable-1.4.3.0 (lib)
Completed    hashable-1.4.3.0 (lib)
Starting     async-2.2.4 (lib)
Building     async-2.2.4 (lib)
Installing   async-2.2.4 (lib)
Completed    async-2.2.4 (lib)
Configuring library for test-cabal-0.1.0.0..
Preprocessing library for test-cabal-0.1.0.0..
GHCi, version 9.4.7: https://www.haskell.org/ghc/  :? for help
ghc-9.4.7.exe: C:\cabal\store\ghc-9.4.7\hashable-1.4.3.0-81e2a757c5dbeba1fc866065cf8206ee339e1961\lib\libHShashable-1.4.3.0-81e2a757c5dbeba1fc866065cf8206ee339e1961.a(#7:LowLevel.o): Not a x86_64 PE+ file.
ghc-9.4.7.exe: Unknown COFF 4 type in getHeaderInfo.
panic! (the 'impossible' happened)
  GHC version 9.4.7:
        loadArchive "C:\\cabal\\store\\ghc-9.4.7\\hashable-1.4.3.0-81e2a757c5dbeba1fc866065cf8206ee339e1961\\lib\\libHShashable-1.4.3.0-81e2a757c5dbeba1fc866065cf8206ee339e1961.a": failed

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

cabal-3.6.2.0.exe: repl failed for test-cabal-0.1.0.0.

I:\DevData\Haskell\test-cabal>cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library

在这两种情况下,问题显然似乎都来自 hashable-1.4.3.0 模块。

© www.soinside.com 2019 - 2024. All rights reserved.