安装管道包后的Haskell

5f0d552i  于 2023-11-18  发布在  其他
关注(0)|答案(1)|浏览(135)

我是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

字符串
你能帮我吗?提前谢谢你)

mjqavswn

mjqavswn1#

(Not an Answer)我在Windows 10上遇到了同样的问题。我只是按照页面https://www.haskell.org/ghcup/上的所有默认说明重新安装了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模块(而不是x86_64 PE+文件)。

相关问题