[英]How to install erd with cabal install without Could not resolve dependencies error?
I'm trying to install erd so I can produce some database table entity relationship diagrams using erd and graphviz . 我正在尝试安装erd,以便可以使用erd和graphviz生成一些数据库表实体关系图。
I have been doing all of the following installs in a Git-Bash command line prompt on a Windows 64 PC. 我一直在Windows 64 PC上的Git-Bash命令行提示符下进行以下所有安装。
First I installed Haskell (with cabal included) from enter link description here , then I did a 首先,我在这里输入链接说明安装了Haskell(包括阴谋集团),然后我做了一个
cabal update
before attempting the actual install of erd with these results 在尝试实际安装带有这些结果的erd之前
$ cabal install erd
Resolving dependencies...
cabal.exe: Could not resolve dependencies:
trying: erd-0.1.3.0 (user goal)
next goal: base (dependency of erd-0.1.3.0)
rejecting: base-4.8.2.0/installed-140... (conflict: erd => base==4.7.*)
rejecting: base-4.8.2.0, 4.8.1.0, 4.8.0.0, 4.7.0.2, 4.7.0.1, 4.7.0.0, 4.6.0.1,
4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2,
4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (global constraint
requires installed instance)
Dependency tree exhaustively searched.
I saw where a reset sometimes helps 我看到重设有时有帮助
rm -rf ~/.ghc ~/.cabal
But in my case it didn't change the results, I still see "Could not resolve dependencies" 但就我而言,它并没有改变结果,我仍然看到“无法解决依赖关系”
Since erd
is an executable, I would just install it using stack
: 由于
erd
是可执行文件,所以我只需要使用stack
即可安装它:
Instructions for installing stack
may be found here: 可以在此处找到安装
stack
说明:
https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md
The run these commands in the shell: 在shell中运行以下命令:
cabal get erd-0.1.3.0
cd erd-0.1.3.0
stack init --resolver lts-2.22
stack build
The last command report something like: 最后一条命令报告如下:
Installing executable(s) in
{some directory}/erd-0.1.3.0/.stack-work/install/x86_64-osx/lts-2.17/7.8.4/bin
We are using lts-2.22 since erd-1.3.0 requires base-4.7. 我们使用lts-2.22,因为erd-1.3.0需要base-4.7。
This is most probably because erd
is a really old package and in the package description it says 这很可能是因为
erd
是一个非常老的软件包,并且在软件包说明中说
Properties
Version 0.1.3.0
Change log None available
Dependencies base (==4.7.*)
, bytestring (==0.10.*)
, containers (==0.5.*)
, graphviz (==2999.*)
, parsec (==3.1.*)
, text (==1.*) [details]
If you use the latest compiler ghc-7.10 or even ghc-8.0 - the current version of base
is packaged up with it - which is of today (2016-05-02) base-4.8
which is incompatible with your project. 如果您使用最新的编译器ghc-7.10甚至ghc-8.0-当前的
base
版本已打包在一起-今天(2016-05-02)的base-4.8
与您的项目不兼容。
So best switch to an older compiler version (ghc-7.8) or try to download the package with cabal get erd
and adjust the cabal file to base == 4.8.*
and give it a try. 因此,最好切换到较旧的编译器版本(ghc-7.8)或尝试使用
cabal get erd
下载软件包,并将cabal文件调整为base == 4.8.*
,然后尝试一下。
这对我cabal install --allow-newer base erd
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.