Can someone suggest troubleshooting steps to resolve the conflict of possible packages?

Here the ghci error throws when I try to run my program.

>Loading package primitive-0.3.1 ... >GHCi runtime linker: fatal error: I found a duplicate definition for symbol >memset_off >whilst processing object file >/home/mlitchard/.cabal/lib/primitive-0.3.1/ghc-7.0.3/HSprimitive-0.3.1.o >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. 

Here is the source followed by this problem.

 >import Network.HTTP.Enumerator >import qualified Data.ByteString.Lazy as L >import Data.ByteString >import Data.Attoparsec.Enumerator (iterParser) >import Data.Aeson >import Data.Attoparsec >import Data.Maybe >import Network.URI >import Network.HTTP >main :: IO () >main = do >req <- openURL "https://pkg.cudaops.com/cgi-bin/qaLinkEditor.cgi?json=1" >print $ parse json req >openURL :: String -> IO ByteString >openURL url = getResponseBody =<< simpleHTTP (mkRequest GET (fromJust $ parseURI url)) 

I have two versions of primitive.0.3.1 and 0.4.0.1

 >0.3.1 is needed by aeson 0.3.2.12 >0.4.0.1 is needed by http-enumerator-0.7.1.1 

ghc-pkg showed that I have a whole mess of broken packages. Perhaps I should remove ghc and cabal and start from scratch?

+4
source share
1 answer

The problem is due to the incorrect solution to this problem.

Here is the actual problem causing this problem, with reference to the solution.

+2
source

All Articles