The problem of using network package in GHC

I have this simple code:

import Network
main = return ()


executing with runhaskell error:

> runhaskell test.hs
test.hs: C: \ ghc \ ghc-6.10.4 \ network- \ HSnetwork- unknown symbol `_getnameinfo '
test.hs: test.hs: unable to load package `network- '

GHCi also gives simillar error message. What can I do about it?

I am using GHC 6.10.4 on Windows 2000.


source to share

2 answers

This most likely means that the GHC binary distribution you installed was built against a different C library than the one on your system. Try reinstalling GHC using the Haskell platform:



You can use cabal to try and reinstall the package. I had similar behavior with CGI library and forced reinstallation fixed.



All Articles