Кабал не может быть обновлен, и "некоторые пакеты не удалось установить"
Я довольно новичок в мире Haskell, и я хотел бы использовать пакет HaskellCharts. Кажется, что путь идет через клику, поэтому я установил cabal-install
из моего репозитория (я на Ubuntu 10.04.4 LTS 32-bit).
Мои характеристики:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.1
$ which ghc
/usr/bin/ghc
$ cabal --version
cabal-install version 0.8.0
using version 1.8.0.2 of the Cabal library
Руководство по установке HaskellCharts (по состоянию на 27 мая 2010 г.) сообщило мне
cabal update
cabal install gtk2hs-buildtools
cabal install gtk
cabal install chart
cabal update
был успешным и сообщил мне, что доступна более новая версия клики.
$ cabal install gtk2hs-buildtools
однако дает
Resolving dependencies...
Downloading gtk2hs-buildtools-0.12.3.1...
Configuring gtk2hs-buildtools-0.12.3.1...
cabal: alex is required but it could not be found.
cabal: Error: some packages failed to install:
gtk2hs-buildtools-0.12.3.1 failed during the configure step. The exception
was:
ExitFailure 1
Поэтому я попытался установить alex
во-первых, но это также приводит к ошибке, происхождение которой я не могу разобрать:
$ cabal install alex
Resolving dependencies...
Downloading alex-3.0.2...
[1 of 1] Compiling Main ( /tmp/alex-3.0.219087/alex-3.0.2/Setup.lhs, /tmp/alex-3.0.219087/alex-3.0.2/dist/setup/Main.o )
Linking /tmp/alex-3.0.219087/alex-3.0.2/dist/setup/setup ...
Configuring alex-3.0.2...
Preprocessing executables for alex-3.0.2...
Building alex-3.0.2...
ghc: unrecognised flags: -rtsopts
Usage: For basic information, try the `--help' option.
cabal: Error: some packages failed to install:
alex-3.0.2 failed during the building phase. The exception was:
ExitFailure 1
Чтобы убедиться, что проблемы не возникнут из-за устаревших версий / несовместимых версий пакетов и т. Д., Я попытался обновить сам себя.
$ cabal install cabal-install
приводит к
Resolving dependencies...
Warning: network.cabal: Ignoring unknown section type: test-suite
Warning: network.cabal: Ignoring unknown section type: test-suite
Configuring network-2.3.1.0...
configure: WARNING: unrecognized options: --with-compiler
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking ws2tcpip.h usability... no
checking ws2tcpip.h presence... no
checking for ws2tcpip.h... no
checking wspiapi.h usability... no
checking wspiapi.h presence... no
checking for wspiapi.h... no
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking for readlink... yes
checking for symlink... yes
checking for struct msghdr.msg_control... yes
checking for struct msghdr.msg_accrights... no
checking for struct sockaddr.sa_len... no
checking for in_addr_t in netinet/in.h... yes
checking for SO_PEERCRED and struct ucred in sys/socket.h... yes
checking for _head_libws2_32_a in -lws2_32... no
checking for getaddrinfo... yes
checking for gai_strerror... yes
checking whether AI_ADDRCONFIG is declared... yes
checking whether AI_ALL is declared... yes
checking whether AI_NUMERICSERV is declared... yes
checking whether AI_V4MAPPED is declared... yes
checking whether IPV6_V6ONLY is declared... yes
checking for sendfile in sys/sendfile.h... yes
checking for sendfile in sys/socket.h... no
checking for gethostent... yes
checking for accept4... yes
configure: creating ./config.status
config.status: creating network.buildinfo
config.status: creating include/HsNetworkConfig.h
configure: WARNING: unrecognized options: --with-compiler
Preprocessing library network-2.3.1.0...
Building network-2.3.1.0...
[ 1 of 10] Compiling Network.URI ( Network/URI.hs, dist/build/Network/URI.o )
Network/URI.hs:580:24:
Couldn't match expected type `Char' against inferred type `[Char]'
Expected type: GenParser Char () Char
Inferred type: URIParser String
In the first argument of `notFollowedBy', namely `regName'
In a stmt of a 'do' expression: notFollowedBy regName
cabal: Error: some packages failed to install:
HTTP-4000.2.3 depends on network-2.3.1.0 which failed to install.
cabal-install-0.10.2 depends on network-2.3.1.0 which failed to install.
network-2.3.1.0 failed during the building phase. The exception was:
ExitFailure 1
Пытаюсь установить network
пакет сам по себе через cabal install network
дает точно такую же ошибку.
Я старался
$ ghc-pkg check
который печатает это:
There are problems in package QuickCheck-2.5:
import-dirs: /home/kenny/.cabal/lib/QuickCheck-2.5/ghc-6.12.1 doesn't exist or isn't a directory
library-dirs: /home/kenny/.cabal/lib/QuickCheck-2.5/ghc-6.12.1 doesn't exist or isn't a directory
file Test/QuickCheck/All.hi is missing
file Test/QuickCheck/Function.hi is missing
file Test/QuickCheck.hi is missing
file Test/QuickCheck/Arbitrary.hi is missing
file Test/QuickCheck/Gen.hi is missing
file Test/QuickCheck/Monadic.hi is missing
file Test/QuickCheck/Modifiers.hi is missing
file Test/QuickCheck/Property.hi is missing
file Test/QuickCheck/Test.hi is missing
file Test/QuickCheck/Text.hi is missing
file Test/QuickCheck/Poly.hi is missing
file Test/QuickCheck/State.hi is missing
file Test/QuickCheck/Exception.hi is missing
cannot find libHSQuickCheck-2.5.a on library path
There are problems in package Chart-0.16:
import-dirs: /home/kenny/.cabal/lib/Chart-0.16/ghc-6.12.1 doesn't exist or isn't a directory
library-dirs: /home/kenny/.cabal/lib/Chart-0.16/ghc-6.12.1 doesn't exist or isn't a directory
file Graphics/Rendering/Chart.hi is missing
file Graphics/Rendering/Chart/Types.hi is missing
file Graphics/Rendering/Chart/Renderable.hi is missing
file Graphics/Rendering/Chart/Axis.hi is missing
file Graphics/Rendering/Chart/Axis/Floating.hi is missing
file Graphics/Rendering/Chart/Axis/Indexed.hi is missing
file Graphics/Rendering/Chart/Axis/Int.hi is missing
file Graphics/Rendering/Chart/Axis/LocalTime.hi is missing
file Graphics/Rendering/Chart/Axis/Types.hi is missing
file Graphics/Rendering/Chart/Axis/Unit.hi is missing
file Graphics/Rendering/Chart/Layout.hi is missing
file Graphics/Rendering/Chart/Legend.hi is missing
file Graphics/Rendering/Chart/Simple.hi is missing
file Graphics/Rendering/Chart/Simple/Internal.hi is missing
file Graphics/Rendering/Chart/Grid.hi is missing
file Graphics/Rendering/Chart/Plot.hi is missing
file Graphics/Rendering/Chart/Plot/Types.hi is missing
file Graphics/Rendering/Chart/Plot/Annotation.hi is missing
file Graphics/Rendering/Chart/Plot/AreaSpots.hi is missing
file Graphics/Rendering/Chart/Plot/Bars.hi is missing
file Graphics/Rendering/Chart/Plot/Candle.hi is missing
file Graphics/Rendering/Chart/Plot/ErrBars.hi is missing
file Graphics/Rendering/Chart/Plot/FillBetween.hi is missing
file Graphics/Rendering/Chart/Plot/Hidden.hi is missing
file Graphics/Rendering/Chart/Plot/Lines.hi is missing
file Graphics/Rendering/Chart/Plot/Pie.hi is missing
file Graphics/Rendering/Chart/Plot/Points.hi is missing
file Graphics/Rendering/Chart/SparkLine.hi is missing
cannot find libHSChart-0.16.a on library path
There are problems in package data-accessor-template-0.2.1.9:
import-dirs: /home/kenny/.cabal/lib/data-accessor-template-0.2.1.9/ghc-6.12.1 doesn't exist or isn't a directory
library-dirs: /home/kenny/.cabal/lib/data-accessor-template-0.2.1.9/ghc-6.12.1 doesn't exist or isn't a directory
file Data/Accessor/Template.hi is missing
file Data/Accessor/Template/Example.hi is missing
cannot find libHSdata-accessor-template-0.2.1.9.a on library path
There are problems in package utility-ht-0.0.8:
import-dirs: /home/kenny/.cabal/lib/utility-ht-0.0.8/ghc-6.12.1 doesn't exist or isn't a directory
library-dirs: /home/kenny/.cabal/lib/utility-ht-0.0.8/ghc-6.12.1 doesn't exist or isn't a directory
file Data/Bool/HT.hi is missing
file Data/Eq/HT.hi is missing
file Data/Function/HT.hi is missing
file Data/Ix/Enum.hi is missing
file Data/List/HT.hi is missing
file Data/List/Key.hi is missing
file Data/List/Match.hi is missing
file Data/Maybe/HT.hi is missing
file Data/Monoid/HT.hi is missing
file Data/Ord/HT.hi is missing
file Data/Record/HT.hi is missing
file Data/String/HT.hi is missing
file Data/Tuple/HT.hi is missing
file Control/Monad/HT.hi is missing
file Control/Functor/HT.hi is missing
file Data/Strictness/HT.hi is missing
file Text/Read/HT.hi is missing
file Text/Show/HT.hi is missing
file Data/Bool/HT/Private.hi is missing
file Data/List/HT/Private.hi is missing
file Data/List/Key/Private.hi is missing
file Data/List/Match/Private.hi is missing
file Data/Function/HT/Private.hi is missing
file Data/Record/HT/Private.hi is missing
cannot find libHSutility-ht-0.0.8.a on library path
There are problems in package data-accessor-0.2.2.2:
import-dirs: /home/kenny/.cabal/lib/data-accessor-0.2.2.2/ghc-6.12.1 doesn't exist or isn't a directory
library-dirs: /home/kenny/.cabal/lib/data-accessor-0.2.2.2/ghc-6.12.1 doesn't exist or isn't a directory
file Data/Accessor.hi is missing
file Data/Accessor/Basic.hi is missing
file Data/Accessor/Container.hi is missing
file Data/Accessor/Show.hi is missing
file Data/Accessor/Tuple.hi is missing
file Data/Accessor/BinaryRead.hi is missing
file Data/Accessor/MonadState.hi is missing
file Data/Accessor/Example.hi is missing
file Data/Accessor/Private.hi is missing
file Data/Accessor/MonadStatePrivate.hi is missing
cannot find libHSdata-accessor-0.2.2.2.a on library path
There are problems in package mtl-2.1.2:
import-dirs: /home/kenny/.cabal/lib/mtl-2.1.2/ghc-6.12.1 doesn't exist or isn't a directory
library-dirs: /home/kenny/.cabal/lib/mtl-2.1.2/ghc-6.12.1 doesn't exist or isn't a directory
file Control/Monad/Cont.hi is missing
file Control/Monad/Cont/Class.hi is missing
file Control/Monad/Error.hi is missing
file Control/Monad/Error/Class.hi is missing
file Control/Monad/Identity.hi is missing
file Control/Monad/List.hi is missing
file Control/Monad/RWS.hi is missing
file Control/Monad/RWS/Class.hi is missing
file Control/Monad/RWS/Lazy.hi is missing
file Control/Monad/RWS/Strict.hi is missing
file Control/Monad/Reader.hi is missing
file Control/Monad/Reader/Class.hi is missing
file Control/Monad/State.hi is missing
file Control/Monad/State/Class.hi is missing
file Control/Monad/State/Lazy.hi is missing
file Control/Monad/State/Strict.hi is missing
file Control/Monad/Trans.hi is missing
file Control/Monad/Writer.hi is missing
file Control/Monad/Writer/Class.hi is missing
file Control/Monad/Writer/Lazy.hi is missing
file Control/Monad/Writer/Strict.hi is missing
cannot find libHSmtl-2.1.2.a on library path
There are problems in package transformers-0.3.0.0:
import-dirs: /home/kenny/.cabal/lib/transformers-0.3.0.0/ghc-6.12.1 doesn't exist or isn't a directory
library-dirs: /home/kenny/.cabal/lib/transformers-0.3.0.0/ghc-6.12.1 doesn't exist or isn't a directory
file Control/Applicative/Backwards.hi is missing
file Control/Applicative/Lift.hi is missing
file Control/Monad/IO/Class.hi is missing
file Control/Monad/Trans/Class.hi is missing
file Control/Monad/Trans/Cont.hi is missing
file Control/Monad/Trans/Error.hi is missing
file Control/Monad/Trans/Identity.hi is missing
file Control/Monad/Trans/List.hi is missing
file Control/Monad/Trans/Maybe.hi is missing
file Control/Monad/Trans/Reader.hi is missing
file Control/Monad/Trans/RWS.hi is missing
file Control/Monad/Trans/RWS/Lazy.hi is missing
file Control/Monad/Trans/RWS/Strict.hi is missing
file Control/Monad/Trans/State.hi is missing
file Control/Monad/Trans/State/Lazy.hi is missing
file Control/Monad/Trans/State/Strict.hi is missing
file Control/Monad/Trans/Writer.hi is missing
file Control/Monad/Trans/Writer/Lazy.hi is missing
file Control/Monad/Trans/Writer/Strict.hi is missing
file Data/Functor/Compose.hi is missing
file Data/Functor/Constant.hi is missing
file Data/Functor/Identity.hi is missing
file Data/Functor/Product.hi is missing
file Data/Functor/Reverse.hi is missing
cannot find libHStransformers-0.3.0.0.a on library path
There are problems in package Cabal-1.14.0:
import-dirs: /home/kenny/.cabal/lib/Cabal-1.14.0/ghc-6.12.1 doesn't exist or isn't a directory
library-dirs: /home/kenny/.cabal/lib/Cabal-1.14.0/ghc-6.12.1 doesn't exist or isn't a directory
file Distribution/Compiler.hi is missing
file Distribution/InstalledPackageInfo.hi is missing
file Distribution/License.hi is missing
file Distribution/Make.hi is missing
file Distribution/ModuleName.hi is missing
file Distribution/Package.hi is missing
file Distribution/PackageDescription.hi is missing
file Distribution/PackageDescription/Configuration.hi is missing
file Distribution/PackageDescription/Parse.hi is missing
file Distribution/PackageDescription/Check.hi is missing
file Distribution/PackageDescription/PrettyPrint.hi is missing
file Distribution/ParseUtils.hi is missing
file Distribution/ReadE.hi is missing
file Distribution/Simple.hi is missing
file Distribution/Simple/Build.hi is missing
file Distribution/Simple/Build/Macros.hi is missing
file Distribution/Simple/Build/PathsModule.hi is missing
file Distribution/Simple/BuildPaths.hi is missing
file Distribution/Simple/Bench.hi is missing
file Distribution/Simple/Command.hi is missing
file Distribution/Simple/Compiler.hi is missing
file Distribution/Simple/Configure.hi is missing
file Distribution/Simple/GHC.hi is missing
file Distribution/Simple/LHC.hi is missing
file Distribution/Simple/Haddock.hi is missing
file Distribution/Simple/Hpc.hi is missing
file Distribution/Simple/Hugs.hi is missing
file Distribution/Simple/Install.hi is missing
file Distribution/Simple/InstallDirs.hi is missing
file Distribution/Simple/JHC.hi is missing
file Distribution/Simple/LocalBuildInfo.hi is missing
file Distribution/Simple/NHC.hi is missing
file Distribution/Simple/PackageIndex.hi is missing
file Distribution/Simple/PreProcess.hi is missing
file Distribution/Simple/PreProcess/Unlit.hi is missing
file Distribution/Simple/Program.hi is missing
file Distribution/Simple/Program/Ar.hi is missing
file Distribution/Simple/Program/Builtin.hi is missing
file Distribution/Simple/Program/Db.hi is missing
file Distribution/Simple/Program/HcPkg.hi is missing
file Distribution/Simple/Program/Hpc.hi is missing
file Distribution/Simple/Program/Ld.hi is missing
file Distribution/Simple/Program/Run.hi is missing
file Distribution/Simple/Program/Script.hi is missing
file Distribution/Simple/Program/Types.hi is missing
file Distribution/Simple/Register.hi is missing
file Distribution/Simple/Setup.hi is missing
file Distribution/Simple/SrcDist.hi is missing
file Distribution/Simple/Test.hi is missing
file Distribution/Simple/UHC.hi is missing
file Distribution/Simple/UserHooks.hi is missing
file Distribution/Simple/Utils.hi is missing
file Distribution/System.hi is missing
file Distribution/TestSuite.hi is missing
file Distribution/Text.hi is missing
file Distribution/Verbosity.hi is missing
file Distribution/Version.hi is missing
file Distribution/Compat/ReadP.hi is missing
file Language/Haskell/Extension.hi is missing
file Distribution/GetOpt.hi is missing
file Distribution/Compat/Exception.hi is missing
file Distribution/Compat/CopyFile.hi is missing
file Distribution/Compat/TempFile.hi is missing
file Distribution/Simple/GHC/IPI641.hi is missing
file Distribution/Simple/GHC/IPI642.hi is missing
file Paths_Cabal.hi is missing
cannot find libHSCabal-1.14.0.a on library path
There are problems in package zlib-0.5.3.3:
import-dirs: /home/kenny/.cabal/lib/zlib-0.5.3.3/ghc-6.12.1 doesn't exist or isn't a directory
library-dirs: /home/kenny/.cabal/lib/zlib-0.5.3.3/ghc-6.12.1 doesn't exist or isn't a directory
file Codec/Compression/GZip.hi is missing
file Codec/Compression/Zlib.hi is missing
file Codec/Compression/Zlib/Raw.hi is missing
file Codec/Compression/Zlib/Internal.hi is missing
file Codec/Compression/Zlib/Stream.hi is missing
cannot find libHSzlib-0.5.3.3.a on library path
There are problems in package colour-2.3.3:
import-dirs: /home/kenny/.cabal/lib/colour-2.3.3/ghc-6.12.1 doesn't exist or isn't a directory
library-dirs: /home/kenny/.cabal/lib/colour-2.3.3/ghc-6.12.1 doesn't exist or isn't a directory
file Data/Colour.hi is missing
file Data/Colour/SRGB.hi is missing
file Data/Colour/SRGB/Linear.hi is missing
file Data/Colour/CIE.hi is missing
file Data/Colour/CIE/Illuminant.hi is missing
file Data/Colour/RGBSpace.hi is missing
file Data/Colour/RGBSpace/HSL.hi is missing
file Data/Colour/RGBSpace/HSV.hi is missing
file Data/Colour/Names.hi is missing
file Data/Colour/Internal.hi is missing
file Data/Colour/Chan.hi is missing
file Data/Colour/RGB.hi is missing
file Data/Colour/Matrix.hi is missing
file Data/Colour/CIE/Chromaticity.hi is missing
cannot find libHScolour-2.3.3.a on library path
There are problems in package Cabal-1.10.2.0:
import-dirs: /home/kenny/.cabal/lib/Cabal-1.10.2.0/ghc-6.12.1 doesn't exist or isn't a directory
library-dirs: /home/kenny/.cabal/lib/Cabal-1.10.2.0/ghc-6.12.1 doesn't exist or isn't a directory
file Distribution/Compiler.hi is missing
file Distribution/InstalledPackageInfo.hi is missing
file Distribution/License.hi is missing
file Distribution/Make.hi is missing
file Distribution/ModuleName.hi is missing
file Distribution/Package.hi is missing
file Distribution/PackageDescription.hi is missing
file Distribution/PackageDescription/Configuration.hi is missing
file Distribution/PackageDescription/Parse.hi is missing
file Distribution/PackageDescription/Check.hi is missing
file Distribution/ParseUtils.hi is missing
file Distribution/ReadE.hi is missing
file Distribution/Simple.hi is missing
file Distribution/Simple/Build.hi is missing
file Distribution/Simple/Build/Macros.hi is missing
file Distribution/Simple/Build/PathsModule.hi is missing
file Distribution/Simple/BuildPaths.hi is missing
file Distribution/Simple/Command.hi is missing
file Distribution/Simple/Compiler.hi is missing
file Distribution/Simple/Configure.hi is missing
file Distribution/Simple/GHC.hi is missing
file Distribution/Simple/LHC.hi is missing
file Distribution/Simple/Haddock.hi is missing
file Distribution/Simple/Hugs.hi is missing
file Distribution/Simple/Install.hi is missing
file Distribution/Simple/InstallDirs.hi is missing
file Distribution/Simple/JHC.hi is missing
file Distribution/Simple/LocalBuildInfo.hi is missing
file Distribution/Simple/NHC.hi is missing
file Distribution/Simple/PackageIndex.hi is missing
file Distribution/Simple/PreProcess.hi is missing
file Distribution/Simple/PreProcess/Unlit.hi is missing
file Distribution/Simple/Program.hi is missing
file Distribution/Simple/Program/Ar.hi is missing
file Distribution/Simple/Program/Builtin.hi is missing
file Distribution/Simple/Program/Db.hi is missing
file Distribution/Simple/Program/HcPkg.hi is missing
file Distribution/Simple/Program/Ld.hi is missing
file Distribution/Simple/Program/Run.hi is missing
file Distribution/Simple/Program/Script.hi is missing
file Distribution/Simple/Program/Types.hi is missing
file Distribution/Simple/Register.hi is missing
file Distribution/Simple/Setup.hi is missing
file Distribution/Simple/SrcDist.hi is missing
file Distribution/Simple/Test.hi is missing
file Distribution/Simple/UHC.hi is missing
file Distribution/Simple/UserHooks.hi is missing
file Distribution/Simple/Utils.hi is missing
file Distribution/System.hi is missing
file Distribution/TestSuite.hi is missing
file Distribution/Text.hi is missing
file Distribution/Verbosity.hi is missing
file Distribution/Version.hi is missing
file Distribution/Compat/ReadP.hi is missing
file Language/Haskell/Extension.hi is missing
file Distribution/GetOpt.hi is missing
file Distribution/Compat/Exception.hi is missing
file Distribution/Compat/CopyFile.hi is missing
file Distribution/Compat/TempFile.hi is missing
file Distribution/Simple/GHC/IPI641.hi is missing
file Distribution/Simple/GHC/IPI642.hi is missing
file Paths_Cabal.hi is missing
cannot find libHSCabal-1.10.2.0.a on library path
The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
QuickCheck-2.5
Chart-0.16
data-accessor-template-0.2.1.9
utility-ht-0.0.8
data-accessor-0.2.2.2
mtl-2.1.2
transformers-0.3.0.0
Cabal-1.14.0
zlib-0.5.3.3
colour-2.3.3
Cabal-1.10.2.0
Я переустановил все пакеты, упомянутые выше, через cabal install --reinstall $PACKAGE
, После этого, ghc-pkg check
не дает больше ошибок, кроме Cabal-1.10.2.0. Что я нахожу очень странным, так это
$ cabal install --reinstall Cabal
пытается установить Cabal-1.14.0, который, кажется, работает нормально, но ghc-pkg check
тем не менее продолжает жаловаться на пропавшую или сломанную Cabal-1.10.2.0.
Трассировка стека, связанная с неудачной установкой сетевого пакета, выглядит для меня так, как будто сам сетевой пакет не был собран должным образом (похоже, есть ошибки компиляции?).
Я тоже попробовал все это с помощью sudo, но это не имело никакого значения. Я также обнаружил, что cabal-install-0.10.2 не удалось на этапе сборки, который имеет дело с похожей загадочной ошибкой "пакеты не удалось установить", но проблема, похоже, не была решена.
Что мне здесь делать? На данный момент это выглядит как ужасно испорченный междусобойчик. Могу ли я что-нибудь с этим сделать или я должен просто забыть об этом и загрузить платформу Haskell с веб-сайта Haskell?
1 ответ
Самое простое решение - просто обновить с нуля, начиная с GHC. Версия 6.12 старая. Однако, если по какой-то причине вы не можете или не хотите обновлять GHC, вот несколько советов, которые помогут вам решить каждую проблему.
Кабал: Алекс требуется, но не может быть найден.
Ваш инстинкт бега cabal install alex
был правильный ответ.
ghc: нераспознанные флаги: -rtsopts
Похоже, у вас есть старый GHC; -rtsopts
Флаг был добавлен в GHC 7 (из вашего вопроса я вижу позже, что вы используете 6.12). Возможно, вам следует попробовать установить более старую версию alex - возможно, современную с 6.12, которая была выпущена 2,5 года назад или около того. При желании, обратитесь к сопровождающему alex, если считаете, что он все еще должен поддерживать GHC6. Еще один выбор - попытаться исправить это самостоятельно; взглянуть на .cabal
файл в комплекте с Алексом и посмотреть, если просто удалить -rtsopts
флаг позволяет вещам продолжаться.
Не удалось сопоставить ожидаемый тип `Char'с логическим типом`[Char]'
Не совсем уверен насчет этого, но похоже, что версия ограничена network
Зависимости не являются достаточно строгими. Опять же, одним из решений является попытка установить более старую версию сети, а другим - попытаться исправить это самостоятельно, изменив network
"s .cabal
файл. Честно говоря, это самая сложная проблема из тех, о которых вы говорите.
(отредактировано, чтобы добавить:) за некоторые обсуждения #haskell, кажется, что тип notFollowedBy
изменился между парсек-2 и парсек-3. Так что, возможно, это так же просто, как преобразование зависимости в сетевом файле в parsec >= 3 вместо>= 2.
но
ghc-pkg check
тем не менее продолжает жаловаться на пропавшую или сломанную Cabal-1.10.2.0
GHC может отслеживать несколько версий одной библиотеки, поэтому установка новой версии Cabal
не исправит старые версии. Вы можете попросить cabal-install переустановить определенную версию, чтобы попытаться это исправить; например
cabal install --reinstall Cabal-1.10.2.0