如果库需要不同版本的`base`,该怎么办? [英] What to do if libraries require a different version of `base`?
问题描述
我试图安装需要与我安装的版本不同的版本的软件包(我有 4.6.0.0
,它们需要< 4.6
)。如何在我的系统上安装这些文件?
base
,因此要安装这些软件包的唯一方法就是先安装这些软件包他们更新是抢源, cabal unpack foo
然后编辑 foo.cabal
,改变 base $的上限c $ c>在那里,打包版本(附加一个
.1
),以便在安装其他包时 cabal
doesn它认为它是坏的,因为它知道的 .cabal
文件(来自包索引)表示它需要不同版本的 base
和
cabal install
从你解压到的目录。
由于base-4.6有一些重大变化,已从 Num
中删除 Eq
和 Show
超类。和 Bits
不再具有 Num
作为超类,可能需要通过添加 Eq
,显示
或 Num
编译。
这很不方便,但几周后您可以用最新的GHC版本自行更新。
I'm trying to install packages which require a different version of base than the one I have installed (I have 4.6.0.0
, they require < 4.6
). How can I install these on my system?
Edit: These packages actually require older packages in order to build, not just as a .cabal constraint.
Since you can't reinstall base
, the only way to get these packages installed before they are updated is to grab the source,
cabal unpack foo
and then edit foo.cabal
, changing the upper bound for base
there, bump the package version (append a .1
) so that when installing other packages cabal
doesn't think it is broken, since the .cabal
file it knows (from the package index) says it requires a different version of base
, and
cabal install
from the directory you unpacked to.
Since there were a few significant changes in base-4.6; the Eq
and Show
superclasses have been removed from Num
, and Bits
no longer has Num
as a superclass, it may be necessary to fix the code by adding Eq
, Show
or Num
to the constraints of some functions to make the packages compile.
That's inconvenient, but the price for being up-to-date yourself with the newest GHC version for a few weeks.
这篇关于如果库需要不同版本的`base`,该怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!