我已经在archlinux上的$HOME
中安装了ghc-7.2.2未知的linux tar.bz2。
在成功安装了一些软件包之后,cabal-dev正在尝试安装,例如。parsec-我得到的数字,文本,广告等等:
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)
这是我的安装中的一个明显的错误还是可能的bug?
我设置了适当的$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
哈哈。尝试在字节串未命中的情况下捕获输出"cabal: cannot configure bytestring-0.9.2.0. It requires ghc- &2>file -any...(与以前相同)“
发布于 2012-01-05 08:35:01
那条信息,
cabal:无法配置base-4.4.1.0
意味着cabal正在尝试重新安装base,或者更幸运的是,它实际上并没有尝试这样做(这是不可能的,base与编译器交织得太紧密了,你绝对不能重新安装它)。但是你正在尝试安装一些需要重新安装base的东西。
问题是,您试图安装的一个(或多个)包依赖于integer-simple
。base
依赖于integer-gmp
或integer-simple
。这两个包都提供了Integer
类型的实现和一些涉及该类型的基本操作,因此您只能使用其中一个。缺省值是integer-gmp
,因为它具有更高的性能,而且是您已经安装的(并且所有预构建的二进制文件都是用它构建的)。
如果你真的需要一个依赖于integer-simple
的包,你必须自己从源代码构建GHC (我建议在构建之后使用integer-gmp
的包,但是,如果它们是相同的GHC版本,那么你必须将它们放在不同的位置,例如普通的在~/bin (和~/lib)中,另一个在~/simple/$dir中)。
从源代码构建它并不是很困难,但确实需要一段时间。该过程是
在编辑器中,将INTEGER_LIBRARY更改为integer-simple并保存
<>G221
https://stackoverflow.com/questions/8730884
复制相似问题