有人可以提供解决可能的包冲突的故障排除步骤吗?
这是我尝试运行程序时 ghci 抛出的错误。
>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.
这是来源,其次是我认为这个问题是什么。
>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))
我有两个版本的 Primitive.0.3.1 和 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 显示我有一堆损坏的软件包。也许我应该删除 ghc 和 cabal 并从头开始?
Here's the error ghci 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's the source, followed by what I think this problem is.
>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 has revealed I have a whole mess of broken packages. Perhaps I should delete ghc and cabal and start from scratch?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该问题源于此问题的错误解决方案
这里是造成此麻烦的实际问题,并参考解决方案。
The problem stems from an incorrect solution to this problem
Here is the actual problem causing this trouble, with reference to the solution.