我在archlinux上的$HOME
安装了ghc-7.2.2未知的linux tar.bz2。
成功安装了多个软件包,并尝试安装cabal-dev。 parsec-numbers,text,ad等我得到:
cabal: cannot configure base-4.4.1.0 It requires ghc-prim -any
integer-simple and rts -any
There is no available version (of each of the above for example)
这在我的安装或可能的错误中是一个明显的错误吗?
我有适当的$GHC_PACKAGES_PATH
设置并运行了ghc-pkg recache。
这是我安装的软件包列表:
/home/jim/cabal-dev/packages-7.2.2.conf:
QuickCheck-2.4.2
bmp-1.1.2.1
comonad-1.1.1.1
comonad-transformers-2.0.2
comonads-fd-2.0.2
contravariant-0.1.3
data-lens-2.0.2
data-reify-0.6
distributive-0.2.0.1
free-2.0.2
mtl-2.0.1.0
primitive-0.4.0.1
random-1.0.1.1
repa-2.2.0.1
repa-algorithms-2.2.0.1
repa-bytestring-2.2.0.1
repa-io-2.2.0.1
semigroupoids-1.2.6
semigroups-0.8
transformers-0.2.2.0
vector-0.9.1
/home/jim/lib/ghc-7.2.2/package.conf.d:
Cabal-1.12.0
array-0.3.0.3
base-4.4.1.0
bin-package-db-0.0.0.0
(binary-0.5.0.2)
bytestring-0.9.2.0
containers-0.4.1.0
directory-1.1.0.1
extensible-exceptions-0.1.1.3
ffi-1.0
filepath-1.2.0.1
(ghc-7.2.2)
ghc-prim-0.2.0.0
(haskell2010-1.1.0.0)
(haskell98-2.0.0.0)
hoopl-3.8.7.1
hpc-0.5.1.0
integer-gmp-0.3.0.0
old-locale-1.0.0.3
old-time-1.0.0.7
pretty-1.1.0.0
process-1.1.0.0
rts-1.0
template-haskell-2.6.0.0
time-1.2.0.5
unix-2.5.0.0
是的,bytestring-0.9.0.2应该是-0.9.2.0,道歉。
cabal-dev -v3 install bytestring --reinstall produces:
cabal-dev 0.9
built with Cabal 1.12.0
searching for cabal in path.
found cabal at /usr/bin/cabal
("/usr/bin/cabal",["--numeric-version"])
/usr/bin/cabal is version 0.10.2
Using cabal-install 0.10.2 at FoundOnSystem {locationPath = "/usr/bin/cabal"}
No sandbox specified. Using cabal-dev
Using cabal-dev as the relative cabal-dev sandbox
Using /home/jim/cabal-dev as the cabal-dev sandbox
Creating local repo /home/jim/cabal-dev/packages
searching for ghc-pkg in path.
found ghc-pkg at /home/jim/bin/ghc-pkg
("/home/jim/bin/ghc-pkg",["--version"])
/home/jim/bin/ghc-pkg is version 7.2.2
Using ghc-pkg 7.2.2
("/usr/bin/cabal",["--version"])
Complete arguments to cabal-install:
["--config-file=/home/jim/cabal-dev/cabal.config","install","--verbose=3","--reinstall"]
("/usr/bin/cabal",["--config-file=/home/jim/cabal-dev/cabal.config","install","--verbose=3","--reinstall","bytestring"])
searching for ghc in path.
found ghc at /home/jim/bin/ghc
("/home/jim/bin/ghc",["--numeric-version"])
/home/jim/bin/ghc is version 7.2.2
looking for tool "ghc-pkg" near compiler in /home/jim/bin
found ghc-pkg in /home/jim/bin/ghc-pkg
("/home/jim/bin/ghc-pkg",["--version"])
/home/jim/bin/ghc-pkg is version 7.2.2
("/home/jim/bin/ghc",["--supported-languages"])
("/home/jim/bin/ghc",["--info"])
Reading installed packages...
("/home/jim/bin/ghc-pkg",["dump","--global","-v2"])
("/home/jim/bin/ghc-pkg",["dump","--package-conf=/home/jim/cabal-dev/packages-7.2.2.conf","-v2"])
("/home/jim/bin/ghc",["--print-libdir"])
Reading available packages...
Resolving dependencies...
selecting
/usr/bin/cabal returned ExitFailure 1
哈哈。尝试使用& 2>文件捕获输出错过了“cabal:无法配置bytestring-0.9.2.0。它需要ghc-prim -any ...(与之前相同)”
答案 0 :(得分:3)
那条消息,
cabal:无法配置base-4.4.1.0
意味着cabal正在尝试重新安装base,或者更幸运的是,它并没有尝试实际执行此操作(这是不可能的,基础与编译器紧密交织,你绝对肯定不能重新安装它)。但是你正在尝试安装需要重新安装基础的东西。
问题是您尝试安装的一个(或多个)软件包取决于integer-simple
。 base
取决于integer-gmp
或integer-simple
。这两个包都提供了Integer
类型的实现以及涉及它的一些基本操作,因此您只能拥有这两个中的一个。默认值为integer-gmp
,因为它是具有更高性能的那个,并且是您已安装的那个(并且所有[?]预构建的二进制文件都是使用它构建的。)
如果你确实需要一个取决于integer-simple
的软件包,你必须自己从源代码构建GHC(我建议在构建之后保留一个integer-gmp
,你必须保留它们但是,如果它们是相同的GHC版本,例如正常的〜/ bin(和〜/ lib),另一个位于〜/ simple / $ dir中。
从源代码构建它并不是很困难,但确实需要一段时间。程序是