我跑了
apt-get install haskell-platform
cabal update
现在我尝试使用
升级cabal版本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.
正如我所说,这是一个全新安装,所以我不知道如何进行任何更改。当我安装与最新的cabal-install不兼容的haskell时,似乎安装了bytestring包的一个版本。在某种程度上,我可以选择我想要开始使用哪种阴谋,或者我该如何应对这个问题?
我应该注意到我之前安装了haskell-platform但我跑了
apt-get purge haskell-platform
apt-get autoremove
在重新安装之前