我在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.
谁可以帮助我?谢谢!
答案 0 :(得分:3)
我似乎在使用cabal
并且我倾向于安装随机软件包时遇到这种情况。每当我遇到这样的情况时,我就完成了以下操作(GHC package management上的部分也很有帮助):
ghc-pkg check
哪会报告任何问题。一旦我完成了这项工作,我会ghc-pkg unregister <offending_package>
并希望问题消失。
如果失败,我会ghc-pkg list
列出软件包并开始卸载(通过ghc-pkg unregister X
)我不再需要的软件包或者我有多个旧版本(由我经常更新到最前沿的建立)。
这个过程似乎总是让我脱离这样的漏洞,但它并不是特别科学,所以希望有人有更好的想法!