简体   繁体   English

Haskell Cabal:神秘缺失或递归依赖

[英]Haskell Cabal: Mysterious missing or recursive dependencies

I try to install the jmacro package. 我尝试安装jmacro包。 It builds perfectly, and there are absolutely no issues. 它构建完美,绝对没有问题。

However, when I want to use it or install packages like happstack-jmacro , which depend on jmacro, I get error messages like this: 但是,当我想使用它或安装依赖于jmacro的happstack-jmacro这样的包时,我收到如下错误消息:

<command line>: cannot satisfy -package-id jmacro-0.5.2-71bd40707d94b0e8eb6e70515ff6a5f4: 
    jmacro-0.5.2-71bd40707d94b0e8eb6e70515ff6a5f4 is unusable due to missing or recursive dependencies:
      haskell-src-meta-0.5-4bf46b12fb313927e18a04de209944de template-haskell-2.5.0.0-f0b857ddb066aae09d974e610edd228f
    (use -v for more information)

There are absolutely no recursive or missing dependencies. 绝对没有递归或缺少依赖。 Is this a bug? 这是一个错误吗?

I am using template-haskell-2.5.0.0 (because the newer versions don't build) and haskell-src-meta-0.5 . 我使用的是template-haskell-2.5.0.0 (因为新版本没有构建)和haskell-src-meta-0.5 GHC is 7.0.4 GHC是7.0.4

Looks like your packages are broken. 看起来你的包裹坏了。 ghc-pkg check might complain about some packages; ghc-pkg check可能会抱怨一些包裹; if it does, you could ghc-pkg unregister <pkg> all of them. 如果是这样,你可以ghc-pkg unregister <pkg>所有这些。 Otherwise, the best thing is probably to start afresh: save your ~/.cabal/config file, get rid of ~/.ghc and ~/.cabal , and reinstall cabal-install . 否则,最好的事情可能是重新开始:保存你的~/.cabal/config文件,摆脱~/.ghc~/.cabal ,然后重新安装cabal-install

Cabal problems like this are fairly common, so you might want to look into mitigating the pain with cabal-dev . 像这样的Cabal问题相当常见,因此您可能希望通过cabal-dev来减轻疼痛。

OK, solved it myself: 好的,自己解决了:

There is a bug and template-haskell-2.5.0.0 was installed in the system directory of cabal, as well as in my user directory. 有一个错误,并且在cabal的系统目录以及我的用户目录中安装了template-haskell-2.5.0.0

When I forcedly unregistered template-haskell in my user directory, everything was fine. 当我在我的用户目录中强制取消注册template-haskell时,一切都很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM