cabal install ---全局约束需要安装实例 [英] cabal install --- global constraint requires installed instance

查看:751
本文介绍了cabal install ---全局约束需要安装实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的cabal依赖被列为

  base == 4.6。*,containers == 0.5。*,bytestring == 0.10。*,binary == 0.5。*,parsec == 3.1。* 

/ p>

  cabal sandbox init 
wget http://www.stackage.org/lts/cabal.config
为了克服依赖冲突,我使用沙盒安装。为了克服依赖冲突,我使用了沙箱安装。但是,cabal仍然在谈论一些令我困惑的全局约束。



Cabal依赖关系树的分辨率被拧紧了,

  try:parsec-3.1.8(myproj-0.1.0.0的依赖)
下一个目标:mtl(parsec-3.1.8的依赖)
拒绝:mtl-2.2.1,2.2.0.1,2.2(全局约束需要== 2.1.3.1)
正在尝试:mtl-2.1.3.1
下一个目标:变换器(依赖于mtl-2.1.3.1 )
拒绝:变压器-0.4.2.0,0.4.1.0,0.3.0.0,0.2.2.1,0.2.2.0,0.2.1.0,
0.2.0.0,0.1.4.0,0.1.3.0,0.1 .1.0,0.1.0.1,0.1.0.0,0.0.1.0,0.0.0.0,
0.4.0.0(全局约束需要安装实例)


解决方案

您应该在当前目录中有一个 cabal.config 文件。使用任何文本编辑器打开它,并为安装的变换器字符串进行搜索。



一旦找到它, 变形金刚== 0.4.3.0 或其他任何你喜欢的版本。


My cabal dependencies are listed as

base ==4.6.*, containers ==0.5.*, bytestring ==0.10.*, binary ==0.5.*, parsec ==3.1.*

i did,

cabal sandbox init
wget http://www.stackage.org/lts/cabal.config
cabal install --only-dependencies

To overcome dependency conflicts, i am using sandbox installation. But still, cabal is talking about some global constraints which is confusing for me.

Cabal dependency tree resolution gets screwed as,

    trying: parsec-3.1.8 (dependency of myproj-0.1.0.0)
next goal: mtl (dependency of parsec-3.1.8)
rejecting: mtl-2.2.1, 2.2.0.1, 2.2 (global constraint requires ==2.1.3.1)
trying: mtl-2.1.3.1
next goal: transformers (dependency of mtl-2.1.3.1)
rejecting: transformers-0.4.2.0, 0.4.1.0, 0.3.0.0, 0.2.2.1, 0.2.2.0, 0.2.1.0,
0.2.0.0, 0.1.4.0, 0.1.3.0, 0.1.1.0, 0.1.0.1, 0.1.0.0, 0.0.1.0, 0.0.0.0,
0.4.0.0 (global constraint requires installed instance)

解决方案

You should have a cabal.config file in your current directory. Open it with any text editor and serach for the transformers installed string.

Once you have found it, replace it with transformers ==0.4.3.0 or any other version you like.

这篇关于cabal install ---全局约束需要安装实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆