安装 yesod 时出现问题
我想安装 yesod
来学习一些关于网络的知识,并在业余时间玩一下 Haskell,但是当我这样做时:
> cabal install yesod
Resolving dependencies...
cabal: cannot configure cprng-aes-0.2.2. It requires crypto-api >=0.8
For the dependency on crypto-api >=0.8 there are these packages:
crypto-api-0.8. However none of them are available.
crypto-api-0.8 was excluded because skein-0.1.0.1 requires crypto-api ==0.6.*
crypto-api-0.8 was excluded because crypto-api-0.6.4 was selected instead
crypto-api-0.8 was excluded because clientsession-0.7.3.1 requires crypto-api
>=0.6.4 && <0.7
但我认为我安装了正确的软件包
cabal list cprng-aes skein crypto-api clientsession
* clientsession
Synopsis: Securely store session data in a client-side cookie.
Default available version: 0.7.3.1
Installed versions: 0.7.3.1
Homepage: http://github.com/snoyberg/clientsession/tree/master
License: BSD3
* cprng-aes
Synopsis: Crypto Pseudo Random Number Generator using AES in counter mode.
Default available version: 0.2.2
Installed versions: 0.2.2
Homepage: http://github.com/vincenthz/hs-cprng-aes
License: BSD3
* crypto-api
Synopsis: A generic interface for cryptographic operations
Default available version: 0.8
Installed versions: 0.6.4, 0.8
Homepage: http://trac.haskell.org/crypto-api/wiki
License: BSD3
* crypto-api-tests
Synopsis: A test framework and KATs for cryptographic operations.
Default available version: 0.1
Installed versions: [ Not installed ]
Homepage: http://trac.haskell.org/crypto-api/wiki
License: BSD3
* hack-middleware-clientsession
Synopsis: Middleware for easily keeping session data in client cookies.
Default available version: 0.0.1
Installed versions: [ Not installed ]
Homepage: http://github.com/snoyberg/hack-middleware-clientsession/tree/master
License: BSD3
* skein
Synopsis: Skein, a family of cryptographic hash functions. Includes
Skein-MAC as well.
Default available version: 0.1.0.1
Installed versions: 0.1.0.1
License: BSD3
,我不太了解 < code>cabal install 但似乎 crypto-api >=0.8
和 <7
都是必需的,这似乎是不可能的。
I want to install yesod
to learn a bit about web and playing a bit with Haskell in my spare time but when i do:
> cabal install yesod
Resolving dependencies...
cabal: cannot configure cprng-aes-0.2.2. It requires crypto-api >=0.8
For the dependency on crypto-api >=0.8 there are these packages:
crypto-api-0.8. However none of them are available.
crypto-api-0.8 was excluded because skein-0.1.0.1 requires crypto-api ==0.6.*
crypto-api-0.8 was excluded because crypto-api-0.6.4 was selected instead
crypto-api-0.8 was excluded because clientsession-0.7.3.1 requires crypto-api
>=0.6.4 && <0.7
but i think i have the right packages installed
cabal list cprng-aes skein crypto-api clientsession
* clientsession
Synopsis: Securely store session data in a client-side cookie.
Default available version: 0.7.3.1
Installed versions: 0.7.3.1
Homepage: http://github.com/snoyberg/clientsession/tree/master
License: BSD3
* cprng-aes
Synopsis: Crypto Pseudo Random Number Generator using AES in counter mode.
Default available version: 0.2.2
Installed versions: 0.2.2
Homepage: http://github.com/vincenthz/hs-cprng-aes
License: BSD3
* crypto-api
Synopsis: A generic interface for cryptographic operations
Default available version: 0.8
Installed versions: 0.6.4, 0.8
Homepage: http://trac.haskell.org/crypto-api/wiki
License: BSD3
* crypto-api-tests
Synopsis: A test framework and KATs for cryptographic operations.
Default available version: 0.1
Installed versions: [ Not installed ]
Homepage: http://trac.haskell.org/crypto-api/wiki
License: BSD3
* hack-middleware-clientsession
Synopsis: Middleware for easily keeping session data in client cookies.
Default available version: 0.0.1
Installed versions: [ Not installed ]
Homepage: http://github.com/snoyberg/hack-middleware-clientsession/tree/master
License: BSD3
* skein
Synopsis: Skein, a family of cryptographic hash functions. Includes
Skein-MAC as well.
Default available version: 0.1.0.1
Installed versions: 0.1.0.1
License: BSD3
i don't know much about cabal install
but it seems that both crypto-api >=0.8
and <7
are required, which seems impossible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里是 Crypto-API 维护者。
问题
问题是这些包是互斥的。最新的 cprng-aes 需要 crypto-api 版本
>= 0.8
。最新的 skein 需要 crypto-api0.6.*
。因此,我们希望 skein 开发人员(我将向其发送电子邮件)更新软件包。现在
在那之前,您需要安装相关软件包的旧版本。尝试这样的事情:
我认为语法是正确的。如果没有,你总是可以这样做:
社区如何避免这种情况
从长远来看,我希望 cabal 会变得更好并自动找到兼容版本,就像我在上面所做的那样。如果没有这样的阴谋集团改进,每个人都提到但没有人实现,那么包维护者最好尝试在其构建部门上保持一致的下限。如果 cprng-aes 仍然接受
crypto-api >= 0.5
那么我认为这可能是由 cabal 安装的。这对软件包维护者来说有点太多了,但他们可以使用 CPP 和 cabal 提供的{MAX,MIN}_VERSION
宏来做到这一点。编辑:更新
Felipe 已更新 skein 并上传至 hackage。 Michael 已经更新了 clientsession,并且鉴于他是 Yesod 维护者并且已经参与了电子邮件对话,我相信他很快就会将其上传到 hackage。当您阅读此消息时,事情应该已经解决,只需运行:
经过反思,我看到 crypto-api 中的主要版本流量波动对社区的其他部分造成了多少影响。我不知道如何处理这个问题。我本可以只是观察到“如果我做出这一改变,没有人会受到影响”,然后就与 PVP 决裂。 OTOH,如果我在未能遵循 PVP 时确实破坏了某人的代码,那么他们就有正当理由感到不安。有社区评论吗?
Crypto-API maintainer here.
THE PROBLEM
The problem is the packages are mutually exclusive. The latest cprng-aes requires crypto-api version
>= 0.8
. The latest skein requires crypto-api0.6.*
. So what we want to have happen is the skein developer (whom I will e-mail) to update the package.FOR NOW
Till then, you'll need to install older versions of the packages in question. Try something like:
I think that syntax is right. If not you can always do:
HOW CAN THE COMMUNITY AVOID THIS
In the long term I hope cabal will get better and automatically finding compatible versions, as I did for the above. Short of such cabal improvements, which everyone mentions and nobody implements, it would be good of package maintainers to try and keep a consistent lower bound on their build-deps. If cprng-aes still accepted
crypto-api >= 0.5
then I think this would have been installed by cabal. This is a bit much to ask of package maintainers, but they can do it using CPP and the{MAX,MIN}_VERSION
macros provided by cabal.EDIT: UPDATE
Felipe has updated skein and uploaded to hackage. Michael has updated clientsession and, seeing as he is the Yesod maintainer and already involved in e-mail conversations, I'm sure he will upload it to hackage soon. Things should be fixed by the time you read this message, just run:
On reflection, I see how much traffic major version bumps in crypto-api cause the rest of the community. I'm not sure how to handle the issue. I could have just observed that "no one will be affected if I make this change" and just break with PVP. OTOH, if I do break someones code when I fail to follow PVP then they have a legitimate reason to be upset. Any community comments?