简体   繁体   中英

Haskell Cabal: Mysterious missing or recursive dependencies

I try to install the jmacro package. 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:

<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 . GHC is 7.0.4

Looks like your packages are broken. ghc-pkg check might complain about some packages; if it does, you could ghc-pkg unregister <pkg> all of them. 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 problems like this are fairly common, so you might want to look into mitigating the pain with 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.

When I forcedly unregistered template-haskell in my user directory, everything was fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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