Haskell:安装pureMD5软件包 [英] Haskell: Install pureMD5 package

查看:67
本文介绍了Haskell:安装pureMD5软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图判断两个文件是否可能相同,并发现我可以通过以下StackOverflow线程在Haskell中进行MD5哈希处理:

I am trying to tell whether two files are likely the same, and found I could make a MD5 hash in Haskell from this StackOverflow thread: Compute MD5 digest of file in Haskell

当我尝试安装 pureMD5 时,出现错误:

When I try to install pureMD5, I get an error:

$ cabal install --lib pureMD5
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: base-4.12.0.0/installed-4.1... (user goal)
[__1] trying: ghc-8.6.5/installed-8.6... (user goal)
[__2] next goal: process (user goal)
[__2] rejecting: process-1.6.6.0 (conflict: ghc =>
process==1.6.5.0/installed-1.6...)
[__2] rejecting: process-1.6.5.1, process-1.6.5.0/installed-1.6...,
process-1.6.5.0, process-1.6.4.0, process-1.6.3.0, process-1.6.2.0,
process-1.6.1.0, process-1.6.0.0, process-1.5.0.0, process-1.4.3.0,
process-1.4.2.0, process-1.4.1.0, process-1.4.0.0, process-1.3.0.0,
process-1.2.3.0, process-1.2.2.0, process-1.2.1.0, process-1.2.0.0,
process-1.1.0.2, process-1.1.0.1, process-1.1.0.0, process-1.0.1.5,
process-1.0.1.4, process-1.0.1.3, process-1.0.1.2, process-1.0.1.1,
process-1.0.0.0 (constraint from user target requires ==1.6.6.0)
[__2] fail (backjumping, conflict set: ghc, process)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: process, base, ghc

我不确定从这儿去哪里,我是Haskell的新手.

I am not sure where to go from here, I'm new to Haskell.

推荐答案

这是与pureMD5无关的阴谋(我相信).您可以尝试使用其他环境进行安装:

This is a cabal issue unrelated to pureMD5 (I believe). You can try to install with a different environment as:

cabal new-install --package-env=SomeNewEnv --lib pureMD5

那应该可行.但为什么?以及您当前已将软件包安装到的环境看起来像这样:

And that should work. But why? well the environment you currently have installed packages into looks something like this:

cat ~/.ghc/x86_64-darwin-8.6.4/environments/default | tail
package-id rts
package-id terminfo-0.4.1.2
package-id transformers-0.5.6.2
package-id deepseq-1.4.4.0
package-id ghc-boot-th-8.6.4
package-id pretty-1.1.3.6
package-id template-haskell-2.14.0.0
package-id directory-1.3.3.0
package-id txt-1.2.4.0-09ee5c37
package-id mtl-2.2.2

因此,您看到它修复了特定的软件包版本-对您来说,它可能会保留进程1.6.5.0.如果删除此文件,则将成功尝试安装process-1.6.6.0,并且安装将在没有-package-env 的情况下进行.

So you see it fixes a particular package version - for you it probably keeps process-1.6.5.0. If you remove this file then the attempted install of process-1.6.6.0 will succeed and the install will work without the --package-env.

再次,这是基于错误以及我认为您的系统状态的猜测-请进行测试并报告.

Again, this is a guess based on the error and what I think your system state is - please do test and report back.

出于好奇,该错误是 https://github.com/haskell/cabal/issues/5559

这篇关于Haskell:安装pureMD5软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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