gpt4 book ai didi

haskell - ghc7.02 上的 runhaskell 错误

转载 作者:行者123 更新时间:2023-12-04 06:31:20 25 4
gpt4 key购买 nike

我在 ghc7.0.2 上创建了一个 yesod 应用程序。

当我使用命令 runhaskell devel-server.hs运行应用程序,发生错误:

GHCi runtime linker: fatal error: I found a duplicate definition for symbol
ghczm7zi0zi2_AsmCodeGen_zdfMonadCmmOptM2_closure
whilst processing object file
/usr/local/lib/ghc-7.0.2/ghc-7.0.2/libHSghc-7.0.2.a
This could be caused by:
* Loading two different object files which export the same symbol
* Specifying the same object file twice on the GHCi command line
* An incorrect `package.conf' entry, causing some object to be
loaded twice.
GHCi cannot safely continue in this situation. Exiting now. Sorry.

谁能帮我?谢谢!

最佳答案

我似乎经常遇到这个问题 cabal以及我安装随机软件包的倾向。每当我遇到这样的情况时,我都会执行以下操作(关于 GHC package management 的部分也很有帮助):

ghc-pkg check

这将报告任何问题。完成此操作后,我会执行 ghc-pkg unregister <offending_package>并希望问题消失。

如果这失败了,我会做 ghc-pkg list列出包并开始卸载(通过 ghc-pkg unregister X )我不再需要的包或我有多个旧版本的包(由于我经常更新到最前沿的版本)。

这个过程似乎总是把我从这样的坑里挖出来,但这不是特别科学,所以希望有人有更好的主意!

关于haskell - ghc7.02 上的 runhaskell 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5388894/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com