Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Haskell Bytestring类型在安装cabal install时失败_Haskell_Cabal_Cabal Install - Fatal编程技术网

Haskell Bytestring类型在安装cabal install时失败

Haskell Bytestring类型在安装cabal install时失败,haskell,cabal,cabal-install,Haskell,Cabal,Cabal Install,我只是跑了 apt-get install haskell-platform cabal update 现在我正试图用 cabal install cabal-install 但它失败了,我得到了以下错误: Resolving dependencies... [ 1 of 81] Compiling Distribution.PackageDescription.Utils ( /tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/Distribution/Pac

我只是跑了

apt-get install haskell-platform
cabal update
现在我正试图用

cabal install cabal-install
但它失败了,我得到了以下错误:

Resolving dependencies...
[ 1 of 81] Compiling Distribution.PackageDescription.Utils ( /tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/Distribution/PackageDescription/Utils.hs, /tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/dist/setup/Distribution/PackageDescription/Utils.o )
[ 2 of 81] Compiling Distribution.Simple.CCompiler ( /tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/Distribution/Simple/CCompiler.hs, /tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/dist/setup/Distribution/Simple/CCompiler.o )
[ 3 of 81] Compiling Distribution.Compat.CreatePipe ( /tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/Distribution/Compat/CreatePipe.hs, /tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/dist/setup/Distribution/Compat/CreatePipe.o )
[ 4 of 81] Compiling Distribution.Compat.Binary.Class ( /tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/Distribution/Compat/Binary/Class.hs, /tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/dist/setup/Distribution/Compat/Binary/Class.o )

/tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/Distribution/Compat/Binary/Class.hs:435:31:
    Couldn't match expected type `bytestring-0.10.0.2:Data.ByteString.Internal.ByteString'
                with actual type `B.ByteString'
    In the first argument of `putByteString', namely `bs'
    In a stmt of a 'do' block: putByteString bs
    In the expression:
      do { put (B.length bs);
           putByteString bs }

/tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/Distribution/Compat/Binary/Class.hs:436:22:
    Couldn't match type `bytestring-0.10.0.2:Data.ByteString.Internal.ByteString'
                  with `B.ByteString'
    Expected type: Int -> Get B.ByteString
      Actual type: Int
                   -> Get bytestring-0.10.0.2:Data.ByteString.Internal.ByteString
    In the second argument of `(>>=)', namely `getByteString'
    In the expression: get >>= getByteString
    In an equation for `get': get = get >>= getByteString

/tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/Distribution/Compat/Binary/Class.hs:445:35:
    Couldn't match expected type `bytestring-0.10.0.2:Data.ByteString.Lazy.Internal.ByteString'
                with actual type `ByteString'
    In the first argument of `putLazyByteString', namely `bs'
    In a stmt of a 'do' block: putLazyByteString bs
    In the expression:
      do { put (fromIntegral (L.length bs) :: Int);
           putLazyByteString bs }

/tmp/Cabal-1.22.4.0-11586/Cabal-1.22.4.0/Distribution/Compat/Binary/Class.hs:446:22:
    Couldn't match type `bytestring-0.10.0.2:Data.ByteString.Lazy.Internal.ByteString'
                  with `ByteString'
    Expected type: Int64 -> Get ByteString
      Actual type: Int64
                   -> Get bytestring-0.10.0.2:Data.ByteString.Lazy.Internal.ByteString
    In the second argument of `(>>=)', namely `getLazyByteString'
    In the expression: get >>= getLazyByteString
    In an equation for `get': get = get >>= getLazyByteString
Failed to install Cabal-1.22.4.0
cabal: Error: some packages failed to install:
Cabal-1.22.4.0 failed during the configure step. The exception was:
ExitFailure 1
cabal-install-1.22.6.0 depends on Cabal-1.22.4.0 which failed to install.
正如我所说,这是一个全新的安装,所以我不知道如何才能进行任何更改。当我安装haskell时,似乎安装了bytestring包的一个版本,它与最新的cabal安装不兼容。在某种程度上,我可以选择我想从哪个阴谋集团开始,或者我该如何处理这个问题

我应该注意,我以前安装过haskell平台,但我运行了

apt-get purge haskell-platform
apt-get autoremove

在重新安装之前

我建议您使用GHC软件包。这样你就可以
安装ghc-7.10.1 cabal-install-1.22
,而不是ghc 7.6.4。@Zeta它们似乎不在标准存储库中。我必须加一个吗?在这种情况下,如何操作?说明在链接的网站上。您需要添加源。这可以通过
sudo-add-apt-repository-ppa:hvr/ghc
完成,然后是
apt-get-update
,然后是
apt-get-install…
。请记住,这不是一个官方的存储库,但它在一段时间内是可靠的。我建议您使用GHC软件包。这样你就可以
安装ghc-7.10.1 cabal-install-1.22
,而不是ghc 7.6.4。@Zeta它们似乎不在标准存储库中。我必须加一个吗?在这种情况下,如何操作?说明在链接的网站上。您需要添加源。这可以通过
sudo-add-apt-repository-ppa:hvr/ghc
完成,然后是
apt-get-update
,然后是
apt-get-install…
。请记住,这不是一个官方的存储库,但它已经可靠了一段时间