开发者

runhaskell error on ghc7.02

I created a yesod application on ghc7.0.2.

开发者_JS百科

when i use the command runhaskell devel-server.hs to run the app, errors occurred:

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.

who can help me? thanks!


I seem to run into this probably quite a lot with cabal and my tendency to install random packages. Whenever I've had a situation like this, I've done the following (the section on GHC package management is also helpful):

ghc-pkg check

Which will report any problems. Once I've done this I do ghc-pkg unregister <offending_package> and hope that the problem goes away.

If this fails I then do ghc-pkg list to list the packages and start uninstalling (via ghc-pkg unregister X) packages that I no longer need or that I have multiple old versions of (caused by me frequently updating to the bleeding edge builds).

This process always seems to dig me out of holes like this, but it isn't particularly scientific so hopefully someone has a better idea!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜