无法使用“重复实例声明”安装 yesod
当我尝试使用命令“cabal install yesod”安装 yesod 时,出现以下错误:
cabal install rsa
Resolving dependencies...
Configuring RSA-1.0.6.1...
Preprocessing library RSA-1.0.6.1...
Preprocessing executables for RSA-1.0.6.1...
Building RSA-1.0.6.1...
[1 of 1] Compiling Codec.Crypto.RSA ( Codec/Crypto/RSA.hs, dist/build/Codec/Crypto/RSA.o )
Codec/Crypto/RSA.hs:577:10:
Duplicate instance declarations:
instance Random Word8 -- Defined at Codec/Crypto/RSA.hs:577:10-21
instance Random Word8 -- Defined in System.Random
cabal: Error: some packages failed to install:
RSA lib 似乎与另一个库冲突。
有什么想法吗?
我的环境: Mac OS X 10.7 GHC 7.0.3
提前致谢。
When I try to install yesod using the command "cabal install yesod", I got the following errors:
cabal install rsa
Resolving dependencies...
Configuring RSA-1.0.6.1...
Preprocessing library RSA-1.0.6.1...
Preprocessing executables for RSA-1.0.6.1...
Building RSA-1.0.6.1...
[1 of 1] Compiling Codec.Crypto.RSA ( Codec/Crypto/RSA.hs, dist/build/Codec/Crypto/RSA.o )
Codec/Crypto/RSA.hs:577:10:
Duplicate instance declarations:
instance Random Word8 -- Defined at Codec/Crypto/RSA.hs:577:10-21
instance Random Word8 -- Defined in System.Random
cabal: Error: some packages failed to install:
It seems RSA lib conflicts with another library.
Any idea?
My environment:
Mac OS X 10.7
GHC 7.0.3
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
random
包在版本 1.0.1.0 中开始导出新实例。一种解决方案是仅当随机包是该版本或更高版本时才有条件编译 RSA 库的实例;像这样的一些变体应该可以工作:如果您向 RSA 库的维护者发送补丁,则可以获得奖励积分。
或者,您可以要求 cabal 使用旧版本的
random
。The
random
package started exporting new instances in version 1.0.1.0. One solution would be to conditionally compile the RSA library's instance only when therandom
package is that version or later; some variation like this should work:Bonus points if you send a patch to the maintainer of the RSA library.
Alternately, you could ask cabal to use an older version of
random
.