cabal安装...失败 - osx - 许多不满意的包

时间:2011-08-21 15:42:41

标签: macos haskell yesod

更新:运行ghc-pkg检查报告:

~: ghc-pkg check
WARNING: cache is out of date: /Library/Frameworks/GHC.framework/Versions/7.0.3i386/usr/lib/ghc-7.0.3/package.conf.d/package.cache
  use 'ghc-pkg recache' to fix.
~: ghc-pkg recache

之后,那个阴谋似乎更开心了!


尝试安装yesod但第一次安装失败是:

Building attoparsec-0.9.1.1...
Building library...
Creating dist/build (and its parents)
/usr/bin/ghc --make -package-name attoparsec-0.9.1.1 -hide-all-packages -fbuilding-cabal-package -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-DAPPLICATIVE_IN_BASE -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.3.1.0-167743fc0dd86f7f2a24843a933b9dce -package-id bytestring-0.9.1.10-77e44adc4117472276bab802bea3c036 -package-id containers-0.4.0.0-18deac99a132f04751d862b77aab136e -package-id deepseq-1.1.0.2-09b3aed0c4982bbc6569c668100876fa -O -Wall -XHaskell98 -XCPP Data.Attoparsec Data.Attoparsec.Char8 Data.Attoparsec.Combinator Data.Attoparsec.FastSet Data.Attoparsec.Lazy Data.Attoparsec.Number Data.Attoparsec.Zepto Data.Attoparsec.Internal Data.Attoparsec.Internal.Types
<command line>: cannot satisfy -package-id deepseq-1.1.0.2-09b3aed0c4982bbc6569c668100876fa
    (use -v for more information)

The complete list of unsatisfied packages is:

    <command line>: cannot satisfy -package-id deepseq-1.1.0.2-09b3aed0c4982bbc6569c668100876fa
    <command line>: cannot satisfy -package-id mtl-2.0.1.0-9763a8821c812a910d327bad2c0d23b2
    <command line>: cannot satisfy -package-id network-2.3.0.2-24fdc6b92867c7236e81708f93cae7d0
    <command line>: cannot satisfy -package-id parsec-3.1.1-5671ee15550b9e1b29f6da36f7643854
    <command line>: cannot satisfy -package-id text-0.11.0.6-7812e10747897216f9b707186c779855
    <command line>: cannot satisfy -package-id transformers-0.2.2.0-a8a2dbba7d96131db605cf631ea0c8c4
    <command line>: cannot satisfy -package-id zlib-0.5.3.1-5fbdf714525b76e0e601c2ffb25f2044

cabal --version的输出:

cabal-install version 0.10.2
using version 1.10.1.0 of the Cabal library

有什么想法吗?

1 个答案:

答案 0 :(得分:23)

在这种情况下,答案是查看ghc包缓存是否是最新的,如果不是,则运行ghc-pkg recache

~: ghc-pkg check
WARNING: cache is out of date: /Library/Frameworks/GHC.framework/Versions/7.0.3i386/usr/lib/ghc7.0.3/package.conf.d/package.cache
  use 'ghc-pkg recache' to fix.
~: ghc-pkg recache

这样做可以让我安装yesod。