如何解决矢量算法包、darcs 等的 cabal 安装错误?

发布于 2024-10-03 17:38:05 字数 4246 浏览 0 评论 0原文

$ ghc -V; cabal -V
The Glorious Glasgow Haskell Compilation System, version 7.0.1
cabal-install version 0.8.2
using version 1.8.0.6 of the Cabal library 

这是错误:

$ cabal install vector-algorithms
Resolving dependencies...
Configuring vector-algorithms-0.3.4...
Preprocessing library vector-algorithms-0.3.4...
Building vector-algorithms-0.3.4...
[1 of 9] Compiling Data.Vector.Algorithms.Common ( Data/Vector/Algorithms/Common.hs, dist/build/Data/Vector/Algorithms/Common.o )
[2 of 9] Compiling Data.Vector.Algorithms.Radix ( Data/Vector/Algorithms/Radix.hs, dist/build/Data/Vector/Algorithms/Radix.o )
[3 of 9] Compiling Data.Vector.Algorithms.Search ( Data/Vector/Algorithms/Search.hs, dist/build/Data/Vector/Algorithms/Search.o )
[4 of 9] Compiling Data.Vector.Algorithms.Optimal ( Data/Vector/Algorithms/Optimal.hs, dist/build/Data/Vector/Algorithms/Optimal.o )
[5 of 9] Compiling Data.Vector.Algorithms.Insertion ( Data/Vector/Algorithms/Insertion.hs, dist/build/Data/Vector/Algorithms/Insertion.o )
[6 of 9] Compiling Data.Vector.Algorithms.TriHeap ( Data/Vector/Algorithms/TriHeap.hs, dist/build/Data/Vector/Algorithms/TriHeap.o )
[7 of 9] Compiling Data.Vector.Algorithms.Intro ( Data/Vector/Algorithms/Intro.hs, dist/build/Data/Vector/Algorithms/Intro.o )
[8 of 9] Compiling Data.Vector.Algorithms.Merge ( Data/Vector/Algorithms/Merge.hs, dist/build/Data/Vector/Algorithms/Merge.o )
[9 of 9] Compiling Data.Vector.Algorithms.Combinators ( Data/Vector/Algorithms/Combinators.hs, dist/build/Data/Vector/Algorithms/Combinators.o )

Data/Vector/Algorithms/Combinators.hs:36:23:
    Couldn't match type `forall s1. ST s1 (Mutable v s1 e)'
                   with `ST s (mv s e)'
    In the second argument of `(.)', namely `N.New'
    In the expression: new . N.New
    In the expression:
      (new . N.New)
        (M.unstream (stream v) >>= \ arr -> algo arr >> return arr)
cabal: Error: some packages failed to install:
vector-algorithms-0.3.4 failed during the building phase. The exception was:
ExitFailure 1

我还注意到,当我安装 cabal-install 时,它安装了 process-1.0.1.4、random-1.0.0.3、Cabal-1.8.0.6、 以及已经存在于全局包数据库中的 time-1.2.0.3 包。 例如,尝试安装 darcs 和其他软件包时,我收到以下信息:

Resolving dependencies...
<command line>: cannot satisfy -package Cabal-1.10.0.0: 
    Cabal-1.10.0.0-30b3f082077a2793c432ea426276c8f9 is unusable due to missing or recursive dependencies:
      process-1.0.1.4-b476e45706840d55749b12ebe18dc835
    (use -v for more information)
cabal: Error: some packages failed to install:

我尝试使用 ghc-pkg 注销所有重复项,但这没有帮助。 我还尝试了 ghc-pkg 检查,但它不会返回任何内容。 我尝试重新开始,删除所有本地数据库,包括 $HOME/.cabal/,然后重新安装 cabal-install,这就是我目前所处的位置。 这是删除所有内容并重新安装 cabal-install 后的结果:

$ ghc-pkg list
/usr/local/lib/ghc-7.0.1/package.conf.d:
    Cabal-1.10.0.0
    array-0.3.0.2
    base-4.3.0.0
    bin-package-db-0.0.0.0
    bytestring-0.9.1.8
    containers-0.4.0.0
    directory-1.1.0.0
    extensible-exceptions-0.1.1.2
    ffi-1.0
    filepath-1.2.0.0
    (ghc-7.0.1)
    (ghc-binary-0.5.0.2)
    ghc-prim-0.2.0.0
    (haskell2010-1.0.0.0)
    haskell98-1.1.0.0
    hpc-0.5.0.6
    integer-gmp-0.2.0.2
    old-locale-1.0.0.2
    old-time-1.0.0.6
    pretty-1.0.1.2
    process-1.0.1.4
    random-1.0.0.3
    rts-1.0
    template-haskell-2.5.0.0
    time-1.2.0.3
    unix-2.4.1.0

/home/moisei/.ghc/x86_64-linux-7.0.1/package.conf.d:
    Cabal-1.8.0.6
    HTTP-4000.1.0
    ListLike-1.1.0
    MonadCatchIO-transformers-0.2.2.2
    PSQueue-1.1
    attoparsec-0.8.2.0
    attoparsec-iteratee-0.1.2
    binary-0.5.0.2
    bytestring-mmap-0.2.1
    bytestring-nums-0.3.2
    bytestring-show-0.3.4
    cere    containers-0.3.0.0
    deepseq-1.1.0.2
    directory-1.0.1.2
    directory-tree-0.9.1
    dlist-0.5
    filepath-1.1.0.4
    haskell98-1.1.0.0
    iteratee-0.3.6
    monads-fd-0.1.0.2
    mtl-1.1.1.0
    mtl-2.0.1.0
    murmur-hash-0.1.0.2
    network-2.2.1.10
    network-2.3
    network-bytestring-0.1.3.2
    parsec-2.1.0.1
    primitive-0.3.1
    process-1.0.1.4
    random-1.0.0.3
    template-haskell-2.5.0.0
    text-0.10.0.0
    time-1.1.4
    transformers-0.2.2.0
    unix-compat-0.2
    vector-0.7.0.1
    zlib-0.5.2.0
$ ghc -V; cabal -V
The Glorious Glasgow Haskell Compilation System, version 7.0.1
cabal-install version 0.8.2
using version 1.8.0.6 of the Cabal library 

Here's the error:

$ cabal install vector-algorithms
Resolving dependencies...
Configuring vector-algorithms-0.3.4...
Preprocessing library vector-algorithms-0.3.4...
Building vector-algorithms-0.3.4...
[1 of 9] Compiling Data.Vector.Algorithms.Common ( Data/Vector/Algorithms/Common.hs, dist/build/Data/Vector/Algorithms/Common.o )
[2 of 9] Compiling Data.Vector.Algorithms.Radix ( Data/Vector/Algorithms/Radix.hs, dist/build/Data/Vector/Algorithms/Radix.o )
[3 of 9] Compiling Data.Vector.Algorithms.Search ( Data/Vector/Algorithms/Search.hs, dist/build/Data/Vector/Algorithms/Search.o )
[4 of 9] Compiling Data.Vector.Algorithms.Optimal ( Data/Vector/Algorithms/Optimal.hs, dist/build/Data/Vector/Algorithms/Optimal.o )
[5 of 9] Compiling Data.Vector.Algorithms.Insertion ( Data/Vector/Algorithms/Insertion.hs, dist/build/Data/Vector/Algorithms/Insertion.o )
[6 of 9] Compiling Data.Vector.Algorithms.TriHeap ( Data/Vector/Algorithms/TriHeap.hs, dist/build/Data/Vector/Algorithms/TriHeap.o )
[7 of 9] Compiling Data.Vector.Algorithms.Intro ( Data/Vector/Algorithms/Intro.hs, dist/build/Data/Vector/Algorithms/Intro.o )
[8 of 9] Compiling Data.Vector.Algorithms.Merge ( Data/Vector/Algorithms/Merge.hs, dist/build/Data/Vector/Algorithms/Merge.o )
[9 of 9] Compiling Data.Vector.Algorithms.Combinators ( Data/Vector/Algorithms/Combinators.hs, dist/build/Data/Vector/Algorithms/Combinators.o )

Data/Vector/Algorithms/Combinators.hs:36:23:
    Couldn't match type `forall s1. ST s1 (Mutable v s1 e)'
                   with `ST s (mv s e)'
    In the second argument of `(.)', namely `N.New'
    In the expression: new . N.New
    In the expression:
      (new . N.New)
        (M.unstream (stream v) >>= \ arr -> algo arr >> return arr)
cabal: Error: some packages failed to install:
vector-algorithms-0.3.4 failed during the building phase. The exception was:
ExitFailure 1

I also noticed that when I installed cabal-install it installed process-1.0.1.4, random-1.0.0.3, Cabal-1.8.0.6,
and the time-1.2.0.3 packages which were already present in the global package database.
For example, trying to install darcs and other packages I receive the following:

Resolving dependencies...
<command line>: cannot satisfy -package Cabal-1.10.0.0: 
    Cabal-1.10.0.0-30b3f082077a2793c432ea426276c8f9 is unusable due to missing or recursive dependencies:
      process-1.0.1.4-b476e45706840d55749b12ebe18dc835
    (use -v for more information)
cabal: Error: some packages failed to install:

I tried ghc-pkg unregister for all the dups, but that didn't help.
I also tried ghc-pkg check and that doesn't return anything, ever.
I tried starting over, removing all the local databases including $HOME/.cabal/, then reinstalling cabal-install and this is where I'm currently at.
This is the result after removing everything, and reinstalling cabal-install:

$ ghc-pkg list
/usr/local/lib/ghc-7.0.1/package.conf.d:
    Cabal-1.10.0.0
    array-0.3.0.2
    base-4.3.0.0
    bin-package-db-0.0.0.0
    bytestring-0.9.1.8
    containers-0.4.0.0
    directory-1.1.0.0
    extensible-exceptions-0.1.1.2
    ffi-1.0
    filepath-1.2.0.0
    (ghc-7.0.1)
    (ghc-binary-0.5.0.2)
    ghc-prim-0.2.0.0
    (haskell2010-1.0.0.0)
    haskell98-1.1.0.0
    hpc-0.5.0.6
    integer-gmp-0.2.0.2
    old-locale-1.0.0.2
    old-time-1.0.0.6
    pretty-1.0.1.2
    process-1.0.1.4
    random-1.0.0.3
    rts-1.0
    template-haskell-2.5.0.0
    time-1.2.0.3
    unix-2.4.1.0

/home/moisei/.ghc/x86_64-linux-7.0.1/package.conf.d:
    Cabal-1.8.0.6
    HTTP-4000.1.0
    ListLike-1.1.0
    MonadCatchIO-transformers-0.2.2.2
    PSQueue-1.1
    attoparsec-0.8.2.0
    attoparsec-iteratee-0.1.2
    binary-0.5.0.2
    bytestring-mmap-0.2.1
    bytestring-nums-0.3.2
    bytestring-show-0.3.4
    cere    containers-0.3.0.0
    deepseq-1.1.0.2
    directory-1.0.1.2
    directory-tree-0.9.1
    dlist-0.5
    filepath-1.1.0.4
    haskell98-1.1.0.0
    iteratee-0.3.6
    monads-fd-0.1.0.2
    mtl-1.1.1.0
    mtl-2.0.1.0
    murmur-hash-0.1.0.2
    network-2.2.1.10
    network-2.3
    network-bytestring-0.1.3.2
    parsec-2.1.0.1
    primitive-0.3.1
    process-1.0.1.4
    random-1.0.0.3
    template-haskell-2.5.0.0
    text-0.10.0.0
    time-1.1.4
    transformers-0.2.2.0
    unix-compat-0.2
    vector-0.7.0.1
    zlib-0.5.2.0

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

執念 2024-10-10 17:38:05

这些不是阴谋集团的错误。矢量包尚未与 GHC 7 一起构建。您是早期采用者,在 Haskell 平台版本发布之前就开始使用 GHC 7。

作为早期采用者,您的职责是向软件包维护人员报告构建错误。

These aren't cabal errors. The vector package doesn't build out of the box with GHC 7 (yet). You're an early adopter, jumping on GHC 7 before the Haskell Platform version is released.

As an early adopter, your duty is to report build errors to package maintainers.

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