有人可以提供解决可能的包冲突的故障排除步骤吗?

发布于 2024-12-10 03:20:48 字数 1453 浏览 4 评论 0原文

这是我尝试运行程序时 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

—━☆沉默づ 2024-12-17 03:20:48

该问题源于此问题的错误解决方案

这里是造成此麻烦的实际问题,并参考解决方案。

The problem stems from an incorrect solution to this problem

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文