为什么 aeson-native 安装失败?

发布于 2024-12-05 07:05:21 字数 1001 浏览 0 评论 0原文

我有两台拱门(64)个机器,我在上面尝试安装Yesod。首先,一个简单的“ Cabal安装Yesod”出色地进行。第二,在构建Aesod-native依赖性时,我会遇到以下错误:

配置Aeson-native-0.3.3 ...
预处理库Aeson-Native-0.3.3 ...
构建Aeson-native-0.3.3 ...
[1 of 6]编译data.aeson.functions(数据/aeson/functions.hs,dist/build/build/data/aeson/functions.o)
[2 of 6]编译data.aeson.types(data/aeson/types.hs,dist/build/build/data/aeson/types.o)

数据/aeson/types.hs:196:22:
没有(NFDATA对象)的实例
rnf'< br>产生 可能的修复:添加(NFDATA对象)的实例声明< br> 在表达式中:rnf o< br> 在 rnf'的等式中:rnf(object o)= rnf o
在实例中,`nfdata value'
声明 Cabal:错误:某些软件包无法安装:
Aeson-Native-0.3.3在建筑阶段失败。例外是:
出口1

上面的故障后,我进行了新的GHC安装,并删除了GHC-PKG和.Cabal目录。同样,同样的错误。 Aeson-native似乎没有错,因为它在其他地方工作正常,因此我的环境必须以某种方式责备。在机器上发生故障时,我过去曾尝试使用PACMAN偶尔管理骇客液体(主要用于Xmonad)。不确定是否重要,但是我从不确定Cabal和Pacman是否知道彼此在做什么。

GHC为7.0.3。在所有安装之前,我都进行了Cabal更新。有什么想法在这个环境中可能有什么问题?

谢谢/O

I have two Arch(64) machines on which I am trying to install yesod. On the first, a simple 'cabal install yesod' proceeds splendidly. On the second, I get the following error while building the aesod-native dependency:

Configuring aeson-native-0.3.3...
Preprocessing library aeson-native-0.3.3...
Building aeson-native-0.3.3...
[1 of 6] Compiling Data.Aeson.Functions ( Data/Aeson/Functions.hs, dist/build/Data/Aeson/Functions.o )
[2 of 6] Compiling Data.Aeson.Types ( Data/Aeson/Types.hs, dist/build/Data/Aeson/Types.o)

Data/Aeson/Types.hs:196:22:
No instance for (NFData Object)
arising from a use of rnf'<br>
Possible fix: add an instance declaration for (NFData Object)<br>
In the expression: rnf o<br>
In an equation for
rnf': rnf (Object o) = rnf o
In the instance declaration for `NFData Value'
cabal: Error: some packages failed to install:
aeson-native-0.3.3 failed during the building phase. The exception was:
ExitFailure 1

After the failure above, I did a fresh ghc install, and removed the ghc-pkg and .cabal directories. Again, same error. There seems to be nothing wrong with aeson-native, since it works fine elsewhere, so my environment must be to blame somehow. On the machine with the failure, I've experimented in the past with using pacman to manage hackage libs on occasion (mostly for xmonad). Not sure if it should matter, but I've never been certain how/if cabal and pacman have any idea what each other are doing.

GHC is 7.0.3. I did a cabal update prior to all installs. Any ideas what could possibly be wrong with this environment?

Thanks/O

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心碎无痕… 2024-12-12 07:05:21

你并不孤单。这应该可以通过:

> cabal install deepseq-1.1.0.2
> ghc-pkg unregister deepseq-1.2.0.1 --force

然后您可以安装任何aeson软件包。请验证它确实是deepSeq-1.2.0.1您已经通过键入ghc-pkg列表deepseq安装了


我几天前有这个错误,但是对于aeson不是aeson-native。我拉请 fix 当时在github上,它已经在hackage上了,尽管不幸的是,不幸的是aeson 不是Aeson-native。我建议您尝试将aeson-native软件包的修复程序提取。回馈社区,尝试一下真的感觉很好! :)

You're not alone. This should be able to get fixed by:

> cabal install deepseq-1.1.0.2
> ghc-pkg unregister deepseq-1.2.0.1 --force

And then you can install any aeson package. Please verify that it's indeed deepseq-1.2.0.1 you have installed by typing ghc-pkg list deepseq


I had this bug too a few days ago, but for aeson not aeson-native. I pull requested a fix on github then and it's already on hackage, though unfortunately only for aeson not aeson-native. May I suggest you try pull-requesting a fix to the aeson-native package. It really feels good to give something back to the community, try it! :)

对象只是data.map的类型同义词,看来nfdata data.map 最近是deeps> deepseq软件包移动到容器< /代码>

但是,这个新版本的容器显然尚未在hackage上发布,因此,由于您使用的是最新版本的deepSeq,因此在任何一个软件包中都找不到该实例。

我希望这将很快得到纠正。同时,您应该能够将deepSeq降级到版本1.1.0.2,这是该实例移动之前的最新版本。

Object is just a type synonym for a Data.Map, and it appears that the NFData instance for Data.Map was recently moved from the deepseq package to containers.

However, this new version of containers has apparently not been released on Hackage yet, so since you're using the latest version of deepseq, the instance is not found in either package.

I expect this to be rectified soon. In the meanwhile, you should be able to downgrade deepseq to version 1.1.0.2, which is the latest version before the instance was moved.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文